diff --git a/examples/color-picker/main.go b/examples/color-picker/main.go index c5ad23e..afaafa4 100644 --- a/examples/color-picker/main.go +++ b/examples/color-picker/main.go @@ -20,5 +20,7 @@ func colorPicker() { func main() { fmt.Println("color picker...") - colorPicker() + for { + colorPicker() + } } diff --git a/window/window.h b/window/window.h index 840e19f..3abb406 100644 --- a/window/window.h +++ b/window/window.h @@ -615,11 +615,11 @@ char* get_title_by_hand(MData m_data){ == kAXErrorSuccess && data != NULL) { char conv[512]; // Convert result to a C-String - CFStringGetCString(data, conv, - 512, kCFStringEncodingUTF8); + CFStringGetCString(data, conv, 512, kCFStringEncodingUTF8); CFRelease(data); + char* s = (char*)calloc(100, sizeof(char*)); - if (s) { strcpy(s,conv); } + if (s) { strcpy(s, conv); } // return (char *)&conv; return s; }