summaryrefslogtreecommitdiff
path: root/altoslib/AltosParse.java
diff options
context:
space:
mode:
Diffstat (limited to 'altoslib/AltosParse.java')
-rw-r--r--altoslib/AltosParse.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/altoslib/AltosParse.java b/altoslib/AltosParse.java
index 12499b7b..fbd049ae 100644
--- a/altoslib/AltosParse.java
+++ b/altoslib/AltosParse.java
@@ -27,6 +27,14 @@ public class AltosParse {
public static int parse_int(String v) throws ParseException {
try {
+ return (int) AltosLib.fromdec(v);
+ } catch (NumberFormatException e) {
+ throw new ParseException("error parsing int " + v, 0);
+ }
+ }
+
+ public static long parse_long(String v) throws ParseException {
+ try {
return AltosLib.fromdec(v);
} catch (NumberFormatException e) {
throw new ParseException("error parsing int " + v, 0);