]> granicus.if.org Git - flex/commitdiff
scanner: fix default of yy_top_state()
authorjannick0 <jannick0@users.noreply.github.com>
Mon, 8 Jan 2018 09:04:23 +0000 (10:04 +0100)
committerWill Estes <westes575@gmail.com>
Tue, 13 Mar 2018 14:45:42 +0000 (10:45 -0400)
extend fix when `YY_G` is used (reentrant scanner).

src/flex.skl

index 05729df9e0aa1d7730d56ed08b6cab8487898101..d9cdcc01ed6759d7a631a4c0c52f091bd4264fec 100644 (file)
@@ -2465,7 +2465,7 @@ m4_ifdef( [[M4_YY_NO_TOP_STATE]],,
 %endif
 {
     M4_YY_DECL_GUTS_VAR();
-       return yy_start_stack_ptr > 0 ? YY_G(yy_start_stack)[YY_G(yy_start_stack_ptr) - 1] : YY_START;
+       return YY_G(yy_start_stack_ptr) > 0 ? YY_G(yy_start_stack)[YY_G(yy_start_stack_ptr) - 1] : YY_START;
 }
 ]])