ソースを参照

Fixed AppendByte and AppendShort not using unsigned variants.

woollybah 6 年 前
コミット
69263a662f
2 ファイル変更8 行追加6 行削除
  1. 5 5
      stringbuilder.mod/glue.c
  2. 3 1
      stringbuilder.mod/stringbuilder.bmx

+ 5 - 5
stringbuilder.mod/glue.c

@@ -516,14 +516,14 @@ void bmx_stringbuilder_append_long(struct MaxStringBuilder * buf, BBInt64 value)
 	bmx_stringbuilder_append_cstring(buf, chars);
 	bmx_stringbuilder_append_cstring(buf, chars);
 }
 }
 
 
-void bmx_stringbuilder_append_short(struct MaxStringBuilder * buf, short value) {
-	char chars[16];
+void bmx_stringbuilder_append_short(struct MaxStringBuilder * buf, BBSHORT value) {
+	BBSHORT chars[16];
 	sprintf(chars, "%d", value);
 	sprintf(chars, "%d", value);
 	bmx_stringbuilder_append_cstring(buf, chars);
 	bmx_stringbuilder_append_cstring(buf, chars);
 }
 }
 
 
-void bmx_stringbuilder_append_byte(struct MaxStringBuilder * buf, char value) {
-	char chars[8];
+void bmx_stringbuilder_append_byte(struct MaxStringBuilder * buf, BBBYTE value) {
+	BBBYTE chars[8];
 	sprintf(chars, "%d", value);
 	sprintf(chars, "%d", value);
 	bmx_stringbuilder_append_cstring(buf, chars);
 	bmx_stringbuilder_append_cstring(buf, chars);
 }
 }
@@ -552,7 +552,7 @@ void bmx_stringbuilder_append_sizet(struct MaxStringBuilder * buf, BBSIZET value
 	bmx_stringbuilder_append_cstring(buf, chars);
 	bmx_stringbuilder_append_cstring(buf, chars);
 }
 }
 
 
-void bmx_stringbuilder_append_shorts(struct MaxStringBuilder * buf, short * shorts, int length) {
+void bmx_stringbuilder_append_shorts(struct MaxStringBuilder * buf, BBSHORT * shorts, int length) {
 	if (length > 0) {
 	if (length > 0) {
 		bmx_stringbuilder_resize(buf, buf->count + length);
 		bmx_stringbuilder_resize(buf, buf->count + length);
 		BBChar * p = buf->buffer + buf->count;
 		BBChar * p = buf->buffer + buf->count;

+ 3 - 1
stringbuilder.mod/stringbuilder.bmx

@@ -23,10 +23,12 @@ bbdoc: A string builder.
 End Rem	
 End Rem	
 Module BRL.StringBuilder
 Module BRL.StringBuilder
 
 
-ModuleInfo "Version: 1.06"
+ModuleInfo "Version: 1.07"
 ModuleInfo "License: zlib/libpng"
 ModuleInfo "License: zlib/libpng"
 ModuleInfo "Copyright: 2018-2019 Bruce A Henderson"
 ModuleInfo "Copyright: 2018-2019 Bruce A Henderson"
 
 
+ModuleInfo "History: 1.07"
+ModuleInfo "History: Fixed AppendByte and AppendShort not using unsigned variants."
 ModuleInfo "History: 1.06"
 ModuleInfo "History: 1.06"
 ModuleInfo "History: Implemented Compare(), and added overloads for = and <>."
 ModuleInfo "History: Implemented Compare(), and added overloads for = and <>."
 ModuleInfo "History: 1.05"
 ModuleInfo "History: 1.05"