1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-24 09:25:31 +02:00

Fix for bug 73197: DisassemblyEditorInput.getAddress can crash.

This commit is contained in:
Mikhail Khodjaiants 2004-09-03 19:49:26 +00:00
parent 6fc219f9cc
commit 1861f7f948
2 changed files with 5 additions and 1 deletions

View file

@ -1,3 +1,7 @@
2004-09-01 Mikhail Khodjaiants
Fix for bug 73197: DisassemblyEditorInput.getAddress can crash.
* DisassemblyEditorInput.java
2004-09-01 Mikhail Khodjaiants
Breakpoint filtering by targets (ui).
* PropertyPageMessages.properties

View file

@ -165,7 +165,7 @@ public class DisassemblyEditorInput implements IEditorInput {
for ( int i = 0; i < lines.length; ++i ) {
IAsmInstruction[] instructions = lines[i].getInstructions();
++current;
if ( lineNumber == current )
if ( lineNumber == current && instructions.length > 0 )
return instructions[0].getAdress();
if ( lineNumber > current && lineNumber <= current + instructions.length )
return instructions[lineNumber - current - 1].getAdress();