Page MenuHomeFeedback Tracker

Preprocessor bug - file is empty if there's nested defines
Closed, ResolvedPublic

Description

When file with nested define is preprocessed it's preprocessed as empty string:

preprocessFile "preprocTest_1.sqf"
when -debug param is not present it will preprocess as empty string "". If it's present it will work properly.

Details

Severity
Major
Resolution
Open
Reproducibility
Always
Operating System
Windows 10 x64
Category
Engine

Event Timeline

dedmen set Ref Ticket to AIII-55358.Sep 6 2022, 10:28 AM
dedmen added a subscriber: dedmen.Sep 6 2022, 11:59 AM

I think I also found the issue with nested ifdef's because of you :D
When it finds a if or ifdef with a false condition, it then proceeds to skip all data until the next #endif
But, that also means it skips if's and ifdefs, causing it to misscount the #endif

So in terms of hierarchy, instead of

#if 
  #ifdef
    #endif (return back one level)
  #endif (return back one level)

it does

#if
  #ifdef (skip)
  #endif (return back one level)
(#if ended)
#endif (uh.. what.. eh. uh.. ok.. back one level but we are in root so.. file just ends here)
dedmen changed the task status from New to Feedback.Sep 6 2022, 12:44 PM

next dev or prof v4

Always a pleasure to give you weird bugs to fix <3

Thanks!

veteran29 closed this task as Resolved.Sep 28 2023, 3:43 PM
veteran29 claimed this task.

Fixed in 2.12