Browse code

core: fix "unsigned" bug in sint2str*()

Due to a typo, the sint2str*() functions did not include the sign
most of the times.

Andrei Pelinescu-Onciul authored on 04/08/2010 14:22:11
Showing 1 changed files
... ...
@@ -365,7 +365,7 @@ static inline char* sint2strbuf(long l, char* r, int r_size, int* len)
365 365
 		l = -l;
366 366
 	}
367 367
 	p = int2strbuf((unsigned long)l, r, r_size, &p_len);
368
-	if(sign && *len<(r_size-1)) {
368
+	if(sign && p_len<(r_size-1)) {
369 369
 		*(--p) = '-';
370 370
 		p_len++;;
371 371
 	}