fortifies regex for asm offset parsing

This commit is contained in:
2026-03-12 20:17:42 +01:00
parent 239cd26a5c
commit 3ba7cdda9e
2 changed files with 2 additions and 4 deletions

View File

@@ -11,7 +11,7 @@ file(STRINGS "${INPUT}" OFFSET_LINES REGEX "->")
set(OFFSET_CONTENT "/* Generated by GenerateAsmOffsets.cmake. */\n")
foreach(LINE IN LISTS OFFSET_LINES)
string(REGEX MATCH "->([A-Za-z0-9_]+)[^0-9-]*(-?[0-9]+)" _ "${LINE}")
string(REGEX MATCH "-->([A-Za-z0-9_]+)[^0-9-]*(-?[0-9]+)" _ "${LINE}")
if(NOT CMAKE_MATCH_1)
continue()
endif()