Correction d'un bug de la calculatrice : quand un joueur fait un smiley qui commence par =
This commit is contained in:
@@ -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");
|
||||
|
Reference in New Issue
Block a user