We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5ab8dec commit 520b7fdCopy full SHA for 520b7fd
lib/xy.h
@@ -1241,13 +1241,14 @@ xy_normalize_path (const char *path)
1241
1242
if (xy_str_start_with (new, "~"))
1243
{
1244
- new = xy_2strcat (xy_os_home, xy_str_delete_prefix (new, "~"));
+ xy_str_swap (&new, xy_2strcat (xy_os_home, xy_str_delete_prefix (new, "~")));
1245
}
1246
1247
if (xy.on_windows)
1248
- return xy_str_gsub (new, "/", "\\");
1249
- else
1250
- return new;
+ {
+ xy_str_swap (&new, xy_str_gsub (new, "/", "\\"));
+ }
1251
+ return new;
1252
1253
1254
0 commit comments