summaryrefslogtreecommitdiff
path: root/riscos/download.c
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2014-05-26 10:19:18 +0100
committerMichael Drake <tlsa@netsurf-browser.org>2014-05-26 10:19:18 +0100
commite105b15bf69bd488e637a95b3c77eebc676e279e (patch)
tree66860f9316de55099de243a87f1e9ff3ebbbb62f /riscos/download.c
parente39f0ff2f163419fb588258b78450a204f112c2a (diff)
downloadnetsurf-e105b15bf69bd488e637a95b3c77eebc676e279e.tar.gz
netsurf-e105b15bf69bd488e637a95b3c77eebc676e279e.tar.bz2
Fix completely broken handling of file: paths.
Was treating lwc_string* as char*.
Diffstat (limited to 'riscos/download.c')
-rw-r--r--riscos/download.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/riscos/download.c b/riscos/download.c
index cbc693f10..f1410f695 100644
--- a/riscos/download.c
+++ b/riscos/download.c
@@ -234,9 +234,10 @@ static nserror download_ro_filetype(download_context *ctx, bits *ftype_out)
if (filescheme) {
lwc_string *path = nsurl_get_component(url, NSURL_PATH);
- if (path != NULL) {
+ if (path != NULL && lwc_string_length(path) != 0) {
char *raw_path;
- raw_path = curl_unescape(path, strlen(path));
+ raw_path = curl_unescape(lwc_string_data(path),
+ lwc_string_length(path));
if (raw_path != NULL) {
ftype = ro_filetype_from_unix_path(raw_path);
curl_free(raw_path);