Projects
openEuler:24.03:SP1:Everything
flex
_service:tar_scm:0001-scanner-fix-default-of-yy...
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:tar_scm:0001-scanner-fix-default-of-yy_top_state.patch of Package flex
From 67b3e448727da3093cdc6f0ca7fd151fbf3c10ad Mon Sep 17 00:00:00 2001 From: jannick0 <jannick0@users.noreply.github.com> Date: Sun, 7 Jan 2018 21:34:32 +0100 Subject: [PATCH] scanner: fix default of yy_top_state() For an _empty_ state stack the top of the state stack defaults to the state as if no state stack were present. NB: sanity check for `yy_start_stack_ptr` could be added in `yy_top_state()`. --- src/flex.skl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/flex.skl b/src/flex.skl index 1043238..05729df 100644 --- a/src/flex.skl +++ b/src/flex.skl @@ -2465,7 +2465,7 @@ m4_ifdef( [[M4_YY_NO_TOP_STATE]],, %endif { M4_YY_DECL_GUTS_VAR(); - return YY_G(yy_start_stack)[YY_G(yy_start_stack_ptr) - 1]; + return yy_start_stack_ptr > 0 ? YY_G(yy_start_stack)[YY_G(yy_start_stack_ptr) - 1] : YY_START; } ]]) -- 1.8.3.1
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2