Chromium Code Reviews| Index: cgpt/cmd_find.c |
| diff --git a/cgpt/cmd_find.c b/cgpt/cmd_find.c |
| index e8fe9b319aeee041093c7acae283f58d07928449..c19803baac5eead22457a16c997f41a506b5ed01 100644 |
| --- a/cgpt/cmd_find.c |
| +++ b/cgpt/cmd_find.c |
| @@ -181,8 +181,11 @@ static int do_search(char *filename) { |
| (set_type && !memcmp(&type_guid, &entry->type, sizeof(Guid)))) { |
| found = 1; |
| } else if (set_label) { |
| - UTF16ToUTF8(entry->name, sizeof(entry->name) / sizeof(entry->name[0]), |
| - (uint8_t *)partlabel, sizeof(partlabel)); |
| + if (CGPT_OK != UTF16ToUTF8(entry->name, |
| + sizeof(entry->name) / sizeof(entry->name[0]), |
|
Bill Richardson
2010/11/17 17:26:39
Should emit an error message here to indicate that
Louis
2010/11/18 05:35:21
Done.
|
| + (uint8_t *)partlabel, sizeof(partlabel))) { |
| + return 0; |
| + } |
| if (!strncmp(label, partlabel, sizeof(partlabel))) { |
| found = 1; |
| } |