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:
parent
6fc219f9cc
commit
1861f7f948
2 changed files with 5 additions and 1 deletions
|
@ -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
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Add table
Reference in a new issue