OpenSDE Packages Database (without history before r20070)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

37 lines
1.3 KiB

  1. # --- SDE-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # Filename: package/.../luaxml/empty_attributes.patch
  5. # Copyright (C) 2010 The OpenSDE Project
  6. #
  7. # More information can be found in the files COPYING and README.
  8. #
  9. # This patch file is dual-licensed. It is available under the license the
  10. # patched project is licensed under, as long as it is an OpenSource license
  11. # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
  12. # of the GNU General Public License as published by the Free Software
  13. # Foundation; either version 2 of the License, or (at your option) any later
  14. # version.
  15. # --- SDE-COPYRIGHT-NOTE-END ---
  16. From: 张增波 <zengbo.zhang@gmail.com>
  17. Date: 2010/9/25
  18. Subject: [patch] LuaXml can't interpret empty attribute
  19. To: gerald.franz@viremo.de
  20. --- ./LuaXML_lib_unix.c 2010-09-25 15:10:19.000000000 +0800
  21. +++ ./LuaXML_lib.c 2010-09-25 15:04:26.000000000 +0800
  22. @@ -319,7 +319,12 @@
  23. if(token[sepPos]) { // regular attribute
  24. const char* aVal =token+sepPos+2;
  25. lua_pushlstring(L, token, sepPos);
  26. - Xml_pushDecode(L, aVal, strlen(aVal)-1);
  27. + if ( strlen(aVal) == 1 ) {
  28. + Xml_pushDecode(L, "", 0);
  29. + }
  30. + else{
  31. + Xml_pushDecode(L, aVal, strlen(aVal)-1);
  32. + }
  33. lua_settable(L, -3);
  34. }
  35. }