diff options
Diffstat (limited to 'Build/source/utils/asymptote/runstring.in')
-rw-r--r-- | Build/source/utils/asymptote/runstring.in | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/Build/source/utils/asymptote/runstring.in b/Build/source/utils/asymptote/runstring.in index 2d2c375a605..e0018ded82c 100644 --- a/Build/source/utils/asymptote/runstring.in +++ b/Build/source/utils/asymptote/runstring.in @@ -46,7 +46,7 @@ void checkformat(const char *ptr, bool intformat) ptr++; while(*ptr && strchr ("-+ #0'I", *ptr)) /* Move past flags. */ - *ptr++; + ptr++; if(*ptr == '*') ptr++; @@ -54,15 +54,15 @@ void checkformat(const char *ptr, bool intformat) ptr++; if(*ptr == '.') { - *ptr++; /* Go past the period. */ + ptr++; /* Go past the period. */ if(*ptr == '*') { ptr++; } else while(isdigit(*ptr)) /* Handle explicit numeric value. */ - *ptr++; + ptr++; } while(*ptr && strchr ("hlL", *ptr)) - *ptr++; + ptr++; if(*ptr == '%') ++ptr; else if(*ptr != '\0') { @@ -185,6 +185,9 @@ string replace(string *S, stringarray2 *translate) while(*p) { for(size_t i=0; i < size;) { array *a=read<array*>(translate,i); + size_t size2=checkArray(a); + if(size2 != 2) + error("translation table entry must be an array of length 2"); string* from=read<string*>(a,0); size_t len=from->length(); if(strncmp(p,from->c_str(),len) != 0) {i++; continue;} |