Correction d'un bug de la calculatrice : quand un joueur fait un smiley qui commence par =

This commit is contained in:
2015-01-02 11:50:44 -05:00
parent 5fd477dbc7
commit 3398c29735
2 changed files with 10 additions and 2 deletions

View File

@@ -735,7 +735,11 @@ public class JArithmeticInterpreter {
{
StringBuffer input = new StringBuffer(expr);
JArithmeticInterpreter jai = JArithmeticInterpreter.constructTree(input,input.length(),0);
JArithmeticInterpreter jai = null;
try {
jai = JArithmeticInterpreter.constructTree(input,input.length(),0);
} catch (Exception e) { }
if (jai==null)
throw new IllegalArgumentException("Le calcul passé en paramètre est invalide");