Browse Source

Fix float parsing.

Stan Hebben 6 years ago
parent
commit
7102642419

+ 1
- 1
JavaBytecodeCompiler/src/main/java/org/openzen/zenscript/javabytecode/compiler/JavaExpressionVisitor.java View File

541
 					argument.accept(this);
541
 					argument.accept(this);
542
 				}
542
 				}
543
 		}
543
 		}
544
-
544
+		
545
 		switch (builtin) {
545
 		switch (builtin) {
546
 			case BOOL_NOT:
546
 			case BOOL_NOT:
547
 				javaWriter.iConst1();
547
 				javaWriter.iConst1();

+ 1
- 1
Parser/src/main/java/org/openzen/zenscript/parser/expression/ParsedExpressionFloat.java View File

35
 		while (isLetter(value.charAt(split - 1)))
35
 		while (isLetter(value.charAt(split - 1)))
36
 			split--;
36
 			split--;
37
 		
37
 		
38
-		this.value = Long.parseLong(value.substring(0, split));
38
+		this.value = Double.parseDouble(value.substring(0, split));
39
 		suffix = value.substring(split);
39
 		suffix = value.substring(split);
40
 	}
40
 	}
41
 	
41
 	

Loading…
Cancel
Save