Changeset: d410117c8eec for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/d410117c8eec
Branch: default
Log Message:

merged


diffs (31 lines):

diff --git a/sql/backends/monet5/copy_convert_num.h 
b/sql/backends/monet5/copy_convert_num.h
--- a/sql/backends/monet5/copy_convert_num.h
+++ b/sql/backends/monet5/copy_convert_num.h
@@ -158,19 +158,24 @@ TMPL_SUFFIXED(parse_one_decimal) (struct
                while(isspace((unsigned char) *s))
                        s++;
 
-       if (*s == '-'){
+       if (*s == '-') {
                neg = true;
                s++;
-       } else if (*s == '+'){
+       } else if (*s == '+') {
                s++;
        }
 
        for (; *s; s++) {
                if (!isdigit((unsigned char) *s))
                        break;
+               if (res && integer_digits == 0) {
+                       copy_report_error(errors, (lng) rel_row, -1, "too many 
decimal digits while parsing decimal: %s", value);
+                       parms->nils++;
+                       return TMPL_NIL;
+               }
                res *= 10;
                res += (*s - '0');
-               integer_digits-=(res)?1:0;
+               integer_digits -= (res != 0);
        }
        if (*s == parms->sep) {
                s++;
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to