Fix Handle leak in windows platform

Also fix a typo in my previous commit :|
This commit is contained in:
Jack Punter 2022-06-06 15:03:08 +01:00
parent 264891de8d
commit 4a8265048d
2 changed files with 3 additions and 2 deletions

View File

@ -296,7 +296,7 @@ lister_render(Application_Links *app, Frame_Info frame_info, View_ID view){
y_pos += first_index*block_height;
i32 max_count = first_index + lister->visible_count + 3;
count = clamp_to(lister->filtered.count, max_count);
count = clamp_top(lister->filtered.count, max_count);
for (i32 i = first_index; i < count; i += 1){
Lister_Node *node = lister->filtered.node_ptrs[i];

View File

@ -335,6 +335,7 @@ system_get_file_list_sig(){
result.infos[counter] = node;
counter += 1;
}
FindClose(search);
}
return(result);
@ -474,7 +475,7 @@ color_picker_hook(HWND Window, UINT Message, WPARAM WParam, LPARAM LParam){
if(GetDlgCtrlID(swatch_window) == 0x2c5)
{
CHOOSECOLORW *win32_params =
(CHOOSECOLORW *)GetWindowLongPtr(Window, GWLP_USERDATA);
(CHOOSECOLORW *)GetWindowLongPtr(Window, GWLP_USERDATA);
if(win32_params)
{
Color_Picker *picker = (Color_Picker*)win32_params->lCustData;