summaryrefslogtreecommitdiff
path: root/scan_urlencoded_query.c
diff options
context:
space:
mode:
Diffstat (limited to 'scan_urlencoded_query.c')
-rw-r--r--scan_urlencoded_query.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/scan_urlencoded_query.c b/scan_urlencoded_query.c
index 241a904..a78a697 100644
--- a/scan_urlencoded_query.c
+++ b/scan_urlencoded_query.c
@@ -78,8 +78,11 @@ ssize_t scan_urlencoded_query(char **string, char *deststring, SCAN_SEARCHPATH_F
78} 78}
79 79
80ssize_t scan_fixed_int( char *data, size_t len, int *tmp ) { 80ssize_t scan_fixed_int( char *data, size_t len, int *tmp ) {
81 int minus = 0;
81 *tmp = 0; 82 *tmp = 0;
83 if( *data == '-' ) --len, ++data, ++minus;
82 while( (len > 0) && (*data >= '0') && (*data <= '9') ) { --len; *tmp = 10**tmp + *data++-'0'; } 84 while( (len > 0) && (*data >= '0') && (*data <= '9') ) { --len; *tmp = 10**tmp + *data++-'0'; }
85 if( minus ) *tmp = -*tmp;
83 return len; 86 return len;
84} 87}
85 88