Browse Source

sjis fixes

vampirefrog 1 year ago
parent
commit
e4f51bf437
1 changed files with 2 additions and 2 deletions
  1. 2
    2
      sjis.c

+ 2
- 2
sjis.c View File

@@ -22,7 +22,7 @@ int sjis_to_utf8(uint8_t *sjis_data, int sjis_len, uint8_t *utf8_data, int utf8_
22 22
 
23 23
 	int j = 0, last_byte = 0;
24 24
 	for(int i = 0; i < sjis_len; i++) {
25
-		char b = sjis_data[i];
25
+		uint8_t b = sjis_data[i];
26 26
 		if(last_byte == 0 && SJIS_FIRST_CHAR(b)) {
27 27
 			last_byte = b;
28 28
 		} else {
@@ -47,7 +47,7 @@ int sjis_write_utf8(FILE *f, uint8_t *sjis_data, int sjis_len) {
47 47
 
48 48
 	int j = 0, last_byte = 0;
49 49
 	for(int i = 0; i < sjis_len; i++) {
50
-		char b = sjis_data[i];
50
+		uint8_t b = sjis_data[i];
51 51
 		if(last_byte == 0 && SJIS_FIRST_CHAR(b)) {
52 52
 			last_byte = b;
53 53
 		} else {

Loading…
Cancel
Save