diff options
Diffstat (limited to 'src/interfaces')
| -rw-r--r-- | src/interfaces/ecpg/preproc/preproc.y | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/interfaces/ecpg/preproc/preproc.y b/src/interfaces/ecpg/preproc/preproc.y index d45322ac17..0d12a10b8e 100644 --- a/src/interfaces/ecpg/preproc/preproc.y +++ b/src/interfaces/ecpg/preproc/preproc.y @@ -3114,12 +3114,13 @@ Bit: bit '(' Iconst ')' if (atol($3) < 1) { sprintf(errortext,"length for type '%s' must be at least 1",$1); - mmerror(ET_ERROR, errortext); + mmerror(ET_ERROR, errortext); } - else if (atol($3) > (MaxAttrSize *sizeof(char))) + else if (atol($3) > (MaxAttrSize * BITSPERBYTE)) { - sprintf(errortext, "length for type '%s' cannot exceed %ld", $1, - (MaxAttrSize * sizeof(char))); + sprintf(errortext, "length for type '%s' cannot exceed %d", $1, + (MaxAttrSize * BITSPERBYTE)); + mmerror(ET_ERROR, errortext); } } | bit @@ -3147,7 +3148,7 @@ Character: character '(' Iconst ')' } else if (atol($3) > MaxAttrSize) { - sprintf(errortext, "length for type '%s' cannot exceed %ld", $1, MaxAttrSize); + sprintf(errortext, "length for type '%s' cannot exceed %d", $1, MaxAttrSize); mmerror(ET_ERROR, errortext); } |
