浏览代码

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 年之前
父节点
当前提交
3ea6da7881
共有 1 个文件被更改,包括 1 次插入1 次删除
  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++;;
 	}