mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-03-28 07:47:03 -05:00
The assumption that the number of lines of colors will be equal to the number of lines in the input signal is incorrect. As issue #2594 shows, erroneous input can cause the lexer to end processing the input file prematurely thus being unable to create tokens past the line where the error occurred which in turn implies that no colors can be found beyond those lines. To fix the crash (the underlying problem is user caused and can't be fixed) is to use the size of the vectors containing the first token index of each line since that size must be equal to the number of lines stored in token sequence. Fixes #2594