1 changed files with 37 additions and 0 deletions
@ -0,0 +1,37 @@ |
|||||||
|
# --- SDE-COPYRIGHT-NOTE-BEGIN ---
|
||||||
|
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
|
||||||
|
#
|
||||||
|
# Filename: package/.../luaxml/empty_attributes.patch
|
||||||
|
# Copyright (C) 2010 The OpenSDE Project
|
||||||
|
#
|
||||||
|
# More information can be found in the files COPYING and README.
|
||||||
|
#
|
||||||
|
# This patch file is dual-licensed. It is available under the license the
|
||||||
|
# patched project is licensed under, as long as it is an OpenSource license
|
||||||
|
# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
|
||||||
|
# of the GNU General Public License as published by the Free Software
|
||||||
|
# Foundation; either version 2 of the License, or (at your option) any later
|
||||||
|
# version.
|
||||||
|
# --- SDE-COPYRIGHT-NOTE-END ---
|
||||||
|
|
||||||
|
From: 张增波 <[email protected]>
|
||||||
|
Date: 2010/9/25
|
||||||
|
Subject: [patch] LuaXml can't interpret empty attribute
|
||||||
|
To: [email protected]
|
||||||
|
|
||||||
|
--- ./LuaXML_lib_unix.c 2010-09-25 15:10:19.000000000 +0800
|
||||||
|
+++ ./LuaXML_lib.c 2010-09-25 15:04:26.000000000 +0800
|
||||||
|
@@ -319,7 +319,12 @@
|
||||||
|
if(token[sepPos]) { // regular attribute
|
||||||
|
const char* aVal =token+sepPos+2;
|
||||||
|
lua_pushlstring(L, token, sepPos);
|
||||||
|
- Xml_pushDecode(L, aVal, strlen(aVal)-1);
|
||||||
|
+ if ( strlen(aVal) == 1 ) {
|
||||||
|
+ Xml_pushDecode(L, "", 0);
|
||||||
|
+ }
|
||||||
|
+ else{
|
||||||
|
+ Xml_pushDecode(L, aVal, strlen(aVal)-1);
|
||||||
|
+ }
|
||||||
|
lua_settable(L, -3);
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in new issue