22 lines
805 B
Diff
22 lines
805 B
Diff
source: https://github.com/chimera-linux/cports/blob/master/main/gimp/patches/atol.patch
|
|
|
|
commit f3237e747d854967a5333b5870dc7aae5cd19431
|
|
Author: q66 <q66@chimera-linux.org>
|
|
Date: Fri May 12 02:52:40 2023 +0200
|
|
|
|
don't use unsafe atol
|
|
|
|
diff --git a/plug-ins/script-fu/libscriptfu/tinyscheme/scheme.c b/plug-ins/script-fu/libscriptfu/tinyscheme/scheme.c
|
|
index 5a3b68e..81e8b0d 100644
|
|
--- a/plug-ins/script-fu/libscriptfu/tinyscheme/scheme.c
|
|
+++ b/plug-ins/script-fu/libscriptfu/tinyscheme/scheme.c
|
|
@@ -1256,7 +1256,7 @@ static pointer mk_atom(scheme *sc, char *q) {
|
|
if(has_dec_point) {
|
|
return mk_real(sc,g_ascii_strtod(q,NULL));
|
|
}
|
|
- return (mk_integer(sc, atol(q)));
|
|
+ return (mk_integer(sc, strtol(q, NULL, 10)));
|
|
}
|
|
|
|
/* make atom from sharp expr representing constant.
|