From: Akim Demaille Date: Thu, 26 Jul 2012 14:07:26 +0000 (+0200) Subject: tests: fix an assertion X-Git-Tag: v2.6.1~20 X-Git-Url: https://git.saurik.com/bison.git/commitdiff_plain/55e075f2299757daf62fd72796d4027502ac40ea tests: fix an assertion * tests/local.at (AT_YYLEX_DEFINE): Be sure to check the array against its length, not its size in bytes. --- diff --git a/tests/local.at b/tests/local.at index 2dbbfc71..5c9b865e 100644 --- a/tests/local.at +++ b/tests/local.at @@ -333,7 +333,7 @@ static static size_t toknum = 0; int res; ]AT_USE_LEX_ARGS[; - assert (toknum < sizeof input); + assert (toknum < sizeof input / sizeof input[0]); res = input[toknum++]; ]$2[;]AT_LOCATION_IF([[ ]AT_LOC_FIRST_LINE[ = ]AT_LOC_LAST_LINE[ = 1;