projects
/
fw
/
altos
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
altosui: Use long input flush timeout when remote.
[fw/altos]
/
altosui
/
AltosEepromRecord.java
diff --git
a/altosui/AltosEepromRecord.java
b/altosui/AltosEepromRecord.java
index e61a7159f19af1e4673b80ed560623ebeb7c3a47..584a04b7c6c053e9a261f1368a603bbb1790c844 100644
(file)
--- a/
altosui/AltosEepromRecord.java
+++ b/
altosui/AltosEepromRecord.java
@@
-65,8
+65,10
@@
public class AltosEepromRecord {
throw new TimeoutException();
int[] values = ParseHex(line);
throw new TimeoutException();
int[] values = ParseHex(line);
- if (values == null)
- throw new ParseException(String.format("invalid line %s", line), 0);
+ if (values == null || values.length < 9) {
+ System.out.printf("invalid line %s", line);
+ throw new ParseException(String.format("inalid line %s", line), 0);
+ }
if (values[0] != (addr & 0xff))
throw new ParseException(String.format("data address out of sync at 0x%x",
addr), 0);
if (values[0] != (addr & 0xff))
throw new ParseException(String.format("data address out of sync at 0x%x",
addr), 0);