From 55e075f2299757daf62fd72796d4027502ac40ea Mon Sep 17 00:00:00 2001 From: Akim Demaille Date: Thu, 26 Jul 2012 16:07:26 +0200 Subject: [PATCH] tests: fix an assertion * tests/local.at (AT_YYLEX_DEFINE): Be sure to check the array against its length, not its size in bytes. --- tests/local.at | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.50.0