fix for invalid empty string check in uniquename callback.
This commit is contained in:
parent
caf84b49f6
commit
3326c0ca75
|
@ -358,8 +358,8 @@ macro(get_blender_version)
|
|||
message(FATAL_ERROR "Version parsing failed for BLENDER_VERSION_CYCLE")
|
||||
endif()
|
||||
|
||||
MATH(EXPR BLENDER_VERSION_MAJOR "${_out_version} / 100")
|
||||
MATH(EXPR BLENDER_VERSION_MINOR "${_out_version} % 100")
|
||||
math(EXPR BLENDER_VERSION_MAJOR "${_out_version} / 100")
|
||||
math(EXPR BLENDER_VERSION_MINOR "${_out_version} % 100")
|
||||
set(BLENDER_VERSION "${BLENDER_VERSION_MAJOR}.${BLENDER_VERSION_MINOR}")
|
||||
|
||||
set(BLENDER_SUBVERSION ${_out_subversion})
|
||||
|
@ -372,7 +372,7 @@ macro(get_blender_version)
|
|||
else()
|
||||
set(_char_ls a b c d e f g h i j k l m n o p q r s t u v w q y z)
|
||||
list(FIND _char_ls ${BLENDER_VERSION_CHAR} _out_version_char_index)
|
||||
MATH(EXPR BLENDER_VERSION_CHAR_INDEX "${_out_version_char_index} + 1")
|
||||
math(EXPR BLENDER_VERSION_CHAR_INDEX "${_out_version_char_index} + 1")
|
||||
unset(_char_ls)
|
||||
unset(_out_version_char_index)
|
||||
endif()
|
||||
|
|
|
@ -206,7 +206,7 @@ void BLI_newname(char *name, int add)
|
|||
|
||||
int BLI_uniquename_cb(int (*unique_check)(void *, const char *), void *arg, const char defname[], char delim, char *name, short name_len)
|
||||
{
|
||||
if(name == '\0') {
|
||||
if(name[0] == '\0') {
|
||||
BLI_strncpy(name, defname, name_len);
|
||||
}
|
||||
|
||||
|
@ -1192,7 +1192,7 @@ void BLI_setenv_if_new(const char *env, const char* val)
|
|||
|
||||
void BLI_clean(char *path)
|
||||
{
|
||||
if(path==0) return;
|
||||
if(path==NULL) return;
|
||||
|
||||
#ifdef WIN32
|
||||
if(path && BLI_strnlen(path, 3) > 2) {
|
||||
|
@ -1205,7 +1205,7 @@ void BLI_clean(char *path)
|
|||
|
||||
void BLI_char_switch(char *string, char from, char to)
|
||||
{
|
||||
if(string==0) return;
|
||||
if(string==NULL) return;
|
||||
while (*string != 0) {
|
||||
if (*string == from) *string = to;
|
||||
string++;
|
||||
|
|
Loading…
Reference in New Issue