Переглянути джерело

fix: iotauth库的str_hex应该用const char*

Wendal Chen 2 роки тому
батько
коміт
a2e7f53f61
1 змінених файлів з 1 додано та 1 видалено
  1. 1 1
      components/iotauth/luat_lib_iotauth.c

+ 1 - 1
components/iotauth/luat_lib_iotauth.c

@@ -33,7 +33,7 @@ static const unsigned char hexchars_s[] = "0123456789abcdef";
 static const unsigned char hexchars_u[] = "0123456789ABCDEF";
 
 static void str_tohex(const char* str, size_t str_len, char* hex,uint8_t uppercase) {
-    unsigned char* hexchars = NULL;
+    const unsigned char* hexchars = NULL;
     if (uppercase)
         hexchars = hexchars_u;
     else