summaryrefslogtreecommitdiff
path: root/src/lj_opt_fold.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lj_opt_fold.c')
-rw-r--r--src/lj_opt_fold.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lj_opt_fold.c b/src/lj_opt_fold.c
index 2240f5db..8f1c8770 100644
--- a/src/lj_opt_fold.c
+++ b/src/lj_opt_fold.c
@@ -25,6 +25,7 @@
25#endif 25#endif
26#include "lj_carith.h" 26#include "lj_carith.h"
27#include "lj_vm.h" 27#include "lj_vm.h"
28#include "lj_strscan.h"
28 29
29/* Here's a short description how the FOLD engine processes instructions: 30/* Here's a short description how the FOLD engine processes instructions:
30** 31**
@@ -693,7 +694,7 @@ LJFOLD(STRTO KGC)
693LJFOLDF(kfold_strto) 694LJFOLDF(kfold_strto)
694{ 695{
695 TValue n; 696 TValue n;
696 if (lj_str_tonum(ir_kstr(fleft), &n)) 697 if (lj_strscan_num(ir_kstr(fleft), &n))
697 return lj_ir_knum(J, numV(&n)); 698 return lj_ir_knum(J, numV(&n));
698 return FAILFOLD; 699 return FAILFOLD;
699} 700}