Skip to content

Commit 0fd71a3

Browse files
committed
Fix bug #149: Problem with big hex numbers in windows
1 parent 7475265 commit 0fd71a3

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

src/common/str.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -555,8 +555,8 @@ var_int_t numexpr_strtol(char *source) {
555555
/**
556556
* convertion: binary to decimal
557557
*/
558-
long bintol(const char *str) {
559-
long r = 0;
558+
var_int_t bintol(const char *str) {
559+
var_int_t r = 0;
560560
char *p = (char *) str;
561561

562562
if (p == NULL) {
@@ -575,8 +575,8 @@ long bintol(const char *str) {
575575
/**
576576
* convertion: octal to decimal
577577
*/
578-
long octtol(const char *str) {
579-
long r = 0;
578+
var_int_t octtol(const char *str) {
579+
var_int_t r = 0;
580580
char *p = (char *) str;
581581

582582
if (p == NULL) {
@@ -595,8 +595,8 @@ long octtol(const char *str) {
595595
/**
596596
* convertion: hexadecimal to decimal
597597
*/
598-
long hextol(const char *str) {
599-
long r = 0;
598+
var_int_t hextol(const char *str) {
599+
var_int_t r = 0;
600600
char *p = (char *) str;
601601

602602
if (p == NULL) {

src/common/str.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ void str_alltrim(char *str);
170170
* @param str the string
171171
* @return the number
172172
*/
173-
long bintol(const char *str);
173+
var_int_t bintol(const char *str);
174174

175175
/**
176176
* @ingroup str
@@ -180,7 +180,7 @@ long bintol(const char *str);
180180
* @param str the string
181181
* @return the number
182182
*/
183-
long octtol(const char *str);
183+
var_int_t octtol(const char *str);
184184

185185
/**
186186
* @ingroup str
@@ -190,7 +190,7 @@ long octtol(const char *str);
190190
* @param str the string
191191
* @return the number
192192
*/
193-
long hextol(const char *str);
193+
var_int_t hextol(const char *str);
194194

195195
/**
196196
* @ingroup str

0 commit comments

Comments
 (0)