Browse Source

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 15 years ago
parent
commit
3ea6da7881
1 changed files with 1 additions and 1 deletions
  1. 1 1
      ut.h

+ 1 - 1
ut.h

@@ -365,7 +365,7 @@ static inline char* sint2strbuf(long l, char* r, int r_size, int* len)
 		l = -l;
 	}
 	p = int2strbuf((unsigned long)l, r, r_size, &p_len);
-	if(sign && *len<(r_size-1)) {
+	if(sign && p_len<(r_size-1)) {
 		*(--p) = '-';
 		p_len++;;
 	}