fix trictly non-const strlen for const strings
found by q66 - strlen happende to work as the optimizer could deduce this was a const value at compile time, but strictly it wasn't so use sizeof instead. @fix
This commit is contained in:
parent
b4ffc94023
commit
e5af64a152
|
@ -976,7 +976,7 @@ struct _Escape_Value
|
|||
size_t value_len;
|
||||
};
|
||||
|
||||
#define ESCAPE_VALUE(e,v) {e,v,strlen(e),strlen(v)}
|
||||
#define ESCAPE_VALUE(e,v) {e,v,sizeof(e)-1,sizeof(v)-1}
|
||||
|
||||
/**
|
||||
* @internal
|
||||
|
|
|
@ -19,7 +19,7 @@ struct _Color_Name_Value
|
|||
unsigned char b;
|
||||
};
|
||||
|
||||
#define COLOR_NAME(name,r,g,b) {name,(unsigned char)strlen(name),r,g,b}
|
||||
#define COLOR_NAME(name,r,g,b) {name,(unsigned char)sizeof(name)-1,r,g,b}
|
||||
|
||||
/**
|
||||
* @internal
|
||||
|
|
Loading…
Reference in New Issue