explicitly cast int to char

Sun, 23 Oct 2022 13:32:46 +0200

author
Mike Becker <universe@uap-core.de>
date
Sun, 23 Oct 2022 13:32:46 +0200
changeset 593
ea9b41b5ebbc
parent 592
bb69ef3ad1f3
child 594
d90cfa6721f9

explicitly cast int to char

src/string.c file | annotate | diff | comparison | revisions
--- a/src/string.c	Sun Oct 23 13:32:16 2022 +0200
+++ b/src/string.c	Sun Oct 23 13:32:46 2022 +0200
@@ -31,7 +31,6 @@
 
 #include <string.h>
 #include <stdarg.h>
-#include <stdint.h>
 #include <ctype.h>
 
 #ifndef _WIN32
@@ -529,13 +528,13 @@
 
 void cx_strlower(cxmutstr string) {
     cx_for_n(i, string.length) {
-        string.ptr[i] = tolower(string.ptr[i]);
+        string.ptr[i] = (char) tolower(string.ptr[i]);
     }
 }
 
 void cx_strupper(cxmutstr string) {
     cx_for_n(i, string.length) {
-        string.ptr[i] = toupper(string.ptr[i]);
+        string.ptr[i] = (char) toupper(string.ptr[i]);
     }
 }
 

mercurial