Skip to content

Commit 9110974

Browse files
committed
FIX: using same return values from OS_Browse on Windows like on Posix
1 parent c4e2b7d commit 9110974

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/os/win32/host-lib.c

+5-3
Original file line numberDiff line numberDiff line change
@@ -1199,6 +1199,8 @@ static void *Task_Ready;
11991199
**
12001200
*/ int OS_Browse(REBCHR *url, int reserved)
12011201
/*
1202+
** Return FALSE on error else TRUE (like on Posix)
1203+
**
12021204
***********************************************************************/
12031205
{
12041206
#define MAX_BRW_PATH 2044
@@ -1211,7 +1213,7 @@ static void *Task_Ready;
12111213
int exit_code = 0;
12121214

12131215
if (RegOpenKeyEx(HKEY_CLASSES_ROOT, TEXT("http\\shell\\open\\command"), 0, KEY_READ, &key) != ERROR_SUCCESS)
1214-
return 0;
1216+
return FALSE;
12151217

12161218
if (!url) url = TEXT("");
12171219

@@ -1222,7 +1224,7 @@ static void *Task_Ready;
12221224
RegCloseKey(key);
12231225
if (flag != ERROR_SUCCESS) {
12241226
FREE_MEM(path);
1225-
return 0;
1227+
return FALSE;
12261228
}
12271229
//if (ExpandEnvironmentStrings(&str[0], result, len))
12281230

@@ -1237,7 +1239,7 @@ static void *Task_Ready;
12371239
INHERIT_TYPE, NULL, NULL); /* u32 err_type, void **err, u32 *err_len */
12381240

12391241
FREE_MEM(path);
1240-
return len;
1242+
return (len < 0) ? FALSE : TRUE;
12411243
}
12421244

12431245

0 commit comments

Comments
 (0)