Changeset: e368e04e93a3 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=e368e04e93a3 Modified Files: monetdb5/modules/atoms/json.c Branch: Oct2014 Log Message:
Fix implementation of hex() macro (match all hex digits, not just octal). diffs (18 lines): diff --git a/monetdb5/modules/atoms/json.c b/monetdb5/modules/atoms/json.c --- a/monetdb5/modules/atoms/json.c +++ b/monetdb5/modules/atoms/json.c @@ -31,7 +31,13 @@ #define skipblancs(J) for(; *(J); (J)++) \ if( *(J) != ' ' && *(J) != '\n' && *(J) != '\t' && *(J) != '\f' && *(J) != '\r' ) break; -#define hex(J) if ( *(J) >='0' && *(J) <='7') (J)++; +#define hex(J) \ + do { \ + if ((*(J) >='0' && *(J) <='9') || \ + (*(J) >='a' && *(J) <='f') || \ + (*(J) >='A' && *(J) <='F')) \ + (J)++; \ + } while (0) #define SEPARATOR ' ' _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list