Fixed an unchecked error in get_app_path().
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@459 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
b194af1035
commit
2a2585c598
@ -1112,11 +1112,13 @@ StorageKit::get_app_path(char *buffer)
|
||||
image_info info;
|
||||
int32 cookie = 0;
|
||||
bool found = false;
|
||||
while (!found && get_next_image_info(0, &cookie, &info) == B_OK) {
|
||||
if (info.type == B_APP_IMAGE) {
|
||||
strncpy(buffer, info.name, B_PATH_NAME_LENGTH);
|
||||
buffer[B_PATH_NAME_LENGTH] = 0;
|
||||
found = true;
|
||||
if (error == B_OK) {
|
||||
while (!found && get_next_image_info(0, &cookie, &info) == B_OK) {
|
||||
if (info.type == B_APP_IMAGE) {
|
||||
strncpy(buffer, info.name, B_PATH_NAME_LENGTH);
|
||||
buffer[B_PATH_NAME_LENGTH] = 0;
|
||||
found = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (error == B_OK && !found)
|
||||
|
Loading…
Reference in New Issue
Block a user