mirror of
https://github.com/fadden/6502bench.git
synced 2026-04-27 03:17:45 +00:00
Fix crashing bug in Goto
The application would crash if an invalid file offset was entered (with "+xxxx"). This bug has been present since v1.0.
This commit is contained in:
1 parent
d4b97007df
commit
6ff349c2f6
1 file changed
+4
-1
@@ -136,7 +136,10 @@ namespace SourceGen.WpfGui {
|
||||
if (input[0] == '+') {
|
||||
// this can only be an offset; convert as hexadecimal number
|
||||
try {
|
||||
TargetOffset = Convert.ToInt32(input.Substring(1), 16);
|
||||
int offset = Convert.ToInt32(input.Substring(1), 16);
|
||||
if (offset >= 0 && offset < mProject.FileDataLength) {
|
||||
TargetOffset = offset;
|
||||
}
|
||||
} catch (Exception) {
|
||||
}
|
||||
return;
|
||||
|
||||
Reference in new issue
Block a user