smasherprog / screen_capture_lite

cross platform screen/window capturing library
MIT License
616 stars 156 forks source link

Bug with too long caption of window #69

Closed zumm closed 5 years ago

zumm commented 5 years ago

Hi. There is bug with code for windows. Problem at this line https://github.com/smasherprog/screen_capture_lite/blob/master/src/windows/GetWindows.cpp#L24 If lenght of window caption is bigger than 128 then code does try write '\n' character to w.Name[128];

P.S.: Why do you even need to write \n to caption? GetWindowTextA returns only null terminated string.

smasherprog commented 5 years ago

Thanks for catching this Fixed in https://github.com/smasherprog/screen_capture_lite/commit/93de4bec9daaa95f7fcc7738ff031ef2dbc37bd9