little improved

This commit is contained in:
HuYingzhuo(hugo/hyzboy) 2023-07-28 18:12:16 +08:00
parent 2f1200b8d5
commit dff19d4be9
2 changed files with 3 additions and 2 deletions

View File

@ -133,7 +133,8 @@ namespace hgl
for(int i=0;i<count;i++) for(int i=0;i<count;i++)
{ {
if((*data_array)->value==data) //if((*data_array)->value==data)
if(hgl_cmp(data_array[i]->value,data)==0)
return(i); return(i);
++data_array; ++data_array;

View File

@ -2467,7 +2467,7 @@ namespace hgl
const int find_str_in_array(int count,const T **str_array,const T *str) const int find_str_in_array(int count,const T **str_array,const T *str)
{ {
for(int i=0;i<count;i++) for(int i=0;i<count;i++)
if(stricmp(str_array[i],str)==0)return(i); if(stricmp(str_array[i],str,strlen(str_array[i]))==0)return(i);
return(-1); return(-1);
} }