Skip to content

Commit b056711

Browse files
committed
code cosmetics
1 parent 43e5fa1 commit b056711

File tree

1 file changed

+13
-10
lines changed

1 file changed

+13
-10
lines changed

src/main.c

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,7 @@ VOID _app_print (
460460
ULONG facility_code;
461461
INT item_count = 0;
462462
INT select_id;
463-
ULONG status;
463+
NTSTATUS status;
464464

465465
error_code = _r_ctrl_getinteger (hwnd, IDC_CODE_CTL, NULL);
466466

@@ -488,13 +488,12 @@ VOID _app_print (
488488
facility_code
489489
);
490490

491+
_r_ctrl_setstring (hwnd, IDC_DESCRIPTION_CTL, config.info);
492+
491493
// print modules
492494
while (_r_obj_enumhashtable (config.modules, &ptr_module, &module_hash, &enum_key))
493495
{
494-
if (!ptr_module->hlib || !ptr_module->file_name)
495-
continue;
496-
497-
if (!_r_config_getboolean_ex (ptr_module->file_name->buffer, TRUE, SECTION_MODULE))
496+
if (!ptr_module->hlib || !ptr_module->file_name || !_r_config_getboolean_ex (ptr_module->file_name->buffer, TRUE, SECTION_MODULE))
498497
continue;
499498

500499
status = _r_sys_formatmessage (error_code, ptr_module->hlib, config.lcid, &string);
@@ -503,14 +502,18 @@ VOID _app_print (
503502

504503
if (NT_SUCCESS (status))
505504
{
506-
_r_listview_additem_ex (hwnd, IDC_LISTVIEW, item_count, _r_obj_getstring (ptr_module->description), I_IMAGENONE, ptr_module->is_internal ? 0 : 1, module_hash);
505+
_r_listview_additem_ex (
506+
hwnd,
507+
IDC_LISTVIEW,
508+
item_count,
509+
_r_obj_getstringordefault (ptr_module->description, ptr_module->file_name->buffer),
510+
I_IMAGENONE,
511+
ptr_module->is_internal ? 0 : 1,
512+
module_hash
513+
);
507514

508515
item_count += 1;
509516
}
510-
else
511-
{
512-
_r_ctrl_setstring (hwnd, IDC_DESCRIPTION_CTL, config.info);
513-
}
514517
}
515518

516519
if (select_id == -1)

0 commit comments

Comments
 (0)