Gitweb links:

...log 
http://git.netsurf-browser.org/netsurf.git/shortlog/81c40ab7c29e6bc59f4c10fa1655fd7e4a47a1ec
...commit 
http://git.netsurf-browser.org/netsurf.git/commit/81c40ab7c29e6bc59f4c10fa1655fd7e4a47a1ec
...tree 
http://git.netsurf-browser.org/netsurf.git/tree/81c40ab7c29e6bc59f4c10fa1655fd7e4a47a1ec

The branch, master has been updated
       via  81c40ab7c29e6bc59f4c10fa1655fd7e4a47a1ec (commit)
      from  99a3d04d5587e7908e0f2b41c71c297999a4e267 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commitdiff 
http://git.netsurf-browser.org/netsurf.git/commit/?id=81c40ab7c29e6bc59f4c10fa1655fd7e4a47a1ec
commit 81c40ab7c29e6bc59f4c10fa1655fd7e4a47a1ec
Author: Chris Young <[email protected]>
Commit: Chris Young <[email protected]>

    Amiga: Fix codesets.library conversion when string specified as zero length

diff --git a/frontends/amiga/utf8.c b/frontends/amiga/utf8.c
index 2a4643b..fabb1e2 100755
--- a/frontends/amiga/utf8.c
+++ b/frontends/amiga/utf8.c
@@ -1,5 +1,5 @@
 /*
- * Copyright 2008-2020 Chris Young <[email protected]>
+ * Copyright 2008-2021 Chris Young <[email protected]>
  *
  * This file is part of NetSurf, http://www.netsurf-browser.org/
  *
@@ -35,7 +35,7 @@
 static nserror ami_utf8_codesets(const char *string, size_t len, char 
**result, bool to_local)
 {
        char *out;
-       ULONG utf8_tag, local_tag;
+       ULONG utf8_tag = CSA_SourceCodeset, local_tag = CSA_DestCodeset, 
len_tag = CSA_SourceLen;
        static struct codeset *utf8_cs = NULL;
        static struct codeset *local_cs = NULL;
 
@@ -54,13 +54,12 @@ static nserror ami_utf8_codesets(const char *string, size_t 
len, char **result,
        if(to_local == false) {
                local_tag = CSA_SourceCodeset;
                utf8_tag = CSA_DestCodeset;
-       } else {
-               utf8_tag = CSA_SourceCodeset;
-               local_tag = CSA_DestCodeset;
        }
 
+       if(len == 0) len_tag = TAG_IGNORE;
+
        out = CodesetsConvertStr(CSA_Source, string,
-                                               CSA_SourceLen, len,
+                                               len_tag, len,
 #ifdef __amigaos4__
                                                local_tag, local_cs,
 #endif


-----------------------------------------------------------------------

Summary of changes:
 frontends/amiga/utf8.c |   11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/frontends/amiga/utf8.c b/frontends/amiga/utf8.c
index 2a4643b..fabb1e2 100755
--- a/frontends/amiga/utf8.c
+++ b/frontends/amiga/utf8.c
@@ -1,5 +1,5 @@
 /*
- * Copyright 2008-2020 Chris Young <[email protected]>
+ * Copyright 2008-2021 Chris Young <[email protected]>
  *
  * This file is part of NetSurf, http://www.netsurf-browser.org/
  *
@@ -35,7 +35,7 @@
 static nserror ami_utf8_codesets(const char *string, size_t len, char 
**result, bool to_local)
 {
        char *out;
-       ULONG utf8_tag, local_tag;
+       ULONG utf8_tag = CSA_SourceCodeset, local_tag = CSA_DestCodeset, 
len_tag = CSA_SourceLen;
        static struct codeset *utf8_cs = NULL;
        static struct codeset *local_cs = NULL;
 
@@ -54,13 +54,12 @@ static nserror ami_utf8_codesets(const char *string, size_t 
len, char **result,
        if(to_local == false) {
                local_tag = CSA_SourceCodeset;
                utf8_tag = CSA_DestCodeset;
-       } else {
-               utf8_tag = CSA_SourceCodeset;
-               local_tag = CSA_DestCodeset;
        }
 
+       if(len == 0) len_tag = TAG_IGNORE;
+
        out = CodesetsConvertStr(CSA_Source, string,
-                                               CSA_SourceLen, len,
+                                               len_tag, len,
 #ifdef __amigaos4__
                                                local_tag, local_cs,
 #endif


-- 
NetSurf Browser
_______________________________________________
netsurf-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to