mirror of
https://github.com/go-vgo/robotgo.git
synced 2025-06-01 14:43:55 +00:00
fixed return address of local variable and not use ternary operator
This commit is contained in:
parent
3d65e37f98
commit
3447822f65
@ -659,12 +659,15 @@ char* get_title_by_hand(MData m_data){
|
|||||||
|
|
||||||
#elif defined(IS_WINDOWS)
|
#elif defined(IS_WINDOWS)
|
||||||
|
|
||||||
return GetWindowText(
|
if (GetWindowText(m_data.HWnd, m_data.Title, 512) > 0){
|
||||||
m_data.HWnd, m_data.Title, 512) > 0 ?
|
char* name = m_data.Title;
|
||||||
m_data.Title : "";
|
|
||||||
// return GetWindowText
|
char* str = (char*)calloc(100, sizeof(char*));
|
||||||
// (mData.HWnd, name, 512) > 0 ?
|
if(str)strcpy(str, name);
|
||||||
// _UTF8Encode(name) : "null";
|
return str;
|
||||||
|
}
|
||||||
|
|
||||||
|
return "";
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user