avoid range check error in ParseCompilationUnit

git-svn-id: trunk@15478 -
This commit is contained in:
pierre 2010-06-25 22:21:38 +00:00
parent 224deb7fe1
commit 8bcad0c07f

View File

@ -615,7 +615,9 @@ begin
DEBUG_WRITELN('DW_LNS_ADVANCE_PC (', hexstr(state.address, sizeof(state.address)*2), ')'); DEBUG_WRITELN('DW_LNS_ADVANCE_PC (', hexstr(state.address, sizeof(state.address)*2), ')');
end; end;
DW_LNS_ADVANCE_LINE : begin DW_LNS_ADVANCE_LINE : begin
inc(state.line, ReadLEB128()); // inc(state.line, ReadLEB128()); negative values are allowed
// but those may generate a range check error
state.line := state.line + ReadLEB128();
DEBUG_WRITELN('DW_LNS_ADVANCE_LINE (', state.line, ')'); DEBUG_WRITELN('DW_LNS_ADVANCE_LINE (', state.line, ')');
end; end;
DW_LNS_SET_FILE : begin DW_LNS_SET_FILE : begin