projects
/
fw
/
altos
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b1a90ad
)
altoslib: Allow empty values in AltosHashSet representation
author
Keith Packard
<keithp@keithp.com>
Sun, 15 May 2016 20:53:38 +0000
(13:53 -0700)
committer
Keith Packard
<keithp@keithp.com>
Sun, 15 May 2016 20:53:38 +0000
(13:53 -0700)
Check for value termination before appending the first character.
Signed-off-by: Keith Packard <keithp@keithp.com>
altoslib/AltosHashSet.java
patch
|
blob
|
history
diff --git
a/altoslib/AltosHashSet.java
b/altoslib/AltosHashSet.java
index 4b89f8cc0cdef8271ba40ab73c8ce3ec7a879374..77bd48c2f58152b914f0c0fa92f9172cf7458e9f 100644
(file)
--- a/
altoslib/AltosHashSet.java
+++ b/
altoslib/AltosHashSet.java
@@
-35,12
+35,12
@@
public class AltosHashSet extends Hashtable<String,String> {
ArrayList<Integer> chars = new ArrayList<Integer>();
for (;;) {
- chars.add(c);
- c = get(reader);
if (c == -1 || c == ';')
break;
if (c == '\\')
c = get(reader);
+ chars.add(c);
+ c = get(reader);
}
int[] ch = new int[chars.size()];
for (int i = 0; i < ch.length; i++)