diff options
Diffstat (limited to 'net-p2p/dclib/files/dclib-0.3.3-xml.patch')
-rw-r--r-- | net-p2p/dclib/files/dclib-0.3.3-xml.patch | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/net-p2p/dclib/files/dclib-0.3.3-xml.patch b/net-p2p/dclib/files/dclib-0.3.3-xml.patch new file mode 100644 index 000000000000..3e93c3d80257 --- /dev/null +++ b/net-p2p/dclib/files/dclib-0.3.3-xml.patch @@ -0,0 +1,34 @@ +--- dclib/core/cxml.cpp.orig Thu Aug 12 10:32:06 2004 ++++ dclib/core/cxml.cpp Thu Dec 2 01:08:00 2004 +@@ -145,12 +145,12 @@ + + res = UTF8Toisolat1( b, &outlen, (unsigned char*)s, &inlen ); + +- if ( res == -2 ) ++ if ( res >= 0 ) ++ r = (char*)b; ++ else if ( res == -2 ) + printf("UTF8Toisolat1 transcoding fail: '%s'\n",s); + else if ( res == -1 ) + printf("UTF8Toisolat1 fail: '%s'\n",s); +- else if ( res == 0 ) +- r = (char*)b; + else + printf("CXml::xml_UTF8Toisolat1 error %d\n",res); + +@@ -178,10 +178,12 @@ + + res = isolat1ToUTF8( b, &outlen, (unsigned char*)s, &inlen ); + +- if ( res == -1 ) ++ if ( res >= 0 ) ++ r = (char*)b; ++ else if ( res == -1 ) + printf("isolat1ToUTF8 fail: '%s'\n",s); +- else if ( res == 0 ) +- r = (char*)b; ++ else ++ printf("CXml::xml_isolat1ToUTF8 error %d\n",res); + + free(b); + |