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:
@@ -1112,11 +1112,13 @@ StorageKit::get_app_path(char *buffer)
|
|||||||
image_info info;
|
image_info info;
|
||||||
int32 cookie = 0;
|
int32 cookie = 0;
|
||||||
bool found = false;
|
bool found = false;
|
||||||
while (!found && get_next_image_info(0, &cookie, &info) == B_OK) {
|
if (error == B_OK) {
|
||||||
if (info.type == B_APP_IMAGE) {
|
while (!found && get_next_image_info(0, &cookie, &info) == B_OK) {
|
||||||
strncpy(buffer, info.name, B_PATH_NAME_LENGTH);
|
if (info.type == B_APP_IMAGE) {
|
||||||
buffer[B_PATH_NAME_LENGTH] = 0;
|
strncpy(buffer, info.name, B_PATH_NAME_LENGTH);
|
||||||
found = true;
|
buffer[B_PATH_NAME_LENGTH] = 0;
|
||||||
|
found = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (error == B_OK && !found)
|
if (error == B_OK && !found)
|
||||||
|
|||||||
Reference in New Issue
Block a user