1 From a54360e9d2a67350f27eec8dfbe1103778b2711c Mon Sep 17 00:00:00 2001
2 From: Fabrice Robinet <fabricerobinet@me.com>
3 Date: Tue, 13 May 2014 16:31:40 -0700
4 Subject: [PATCH 1/2] Revert fix for malformed FBX-COLLADA id
7 GeneratedSaxParser/src/GeneratedSaxParserUtils.cpp | 17 +++++++++++------
8 1 file changed, 11 insertions(+), 6 deletions(-)
10 diff --git a/GeneratedSaxParser/src/GeneratedSaxParserUtils.cpp b/GeneratedSaxParser/src/GeneratedSaxParserUtils.cpp
11 index 404306a..1f9a3ee 100644
12 --- a/GeneratedSaxParser/src/GeneratedSaxParserUtils.cpp
13 +++ b/GeneratedSaxParser/src/GeneratedSaxParserUtils.cpp
14 @@ -868,11 +868,13 @@ namespace GeneratedSaxParser
16 return COLLADABU::URI(0);
18 + const ParserString& string = toStringListItem(buffer, bufferEnd, failed);
19 + return COLLADABU::URI(string.str, string.length);
21 + //FIXME: Testing fails on windows but pass on OSX with this fix.
22 //Just get the string as it is for ids, so that we are able to read FBX-COLLADA
23 //Otherwise, calling toStringItem would result in a truncated string when an id contains spaces
24 - //const ParserString& string = toStringListItem(buffer, bufferEnd, failed);
25 - //return COLLADABU::URI(string.str, string.length);
26 - return COLLADABU::URI((const char*)*buffer, bufferEnd - *buffer);
27 + //return COLLADABU::URI((const char*)*buffer, bufferEnd - *buffer);
30 //--------------------------------------------------------------------
31 @@ -883,11 +885,14 @@ namespace GeneratedSaxParser
33 return COLLADABU::URI(0);
36 + const ParserString& string = toStringListItem(buffer, failed);
37 + return COLLADABU::URI(string.str, string.length);
39 + //FIXME: Testing fails on windows but pass on OSX with this fix.
40 //Just get the string as it is for ids, so that we are able to read FBX-COLLADA
41 //Otherwise, calling toStringItem would result in a truncated string when an id contains spaces
42 - //const ParserString& string = toStringListItem(buffer, failed);
43 - //return COLLADABU::URI(string.str, string.length);
44 - return COLLADABU::URI((const char*)*buffer);
45 + //return COLLADABU::URI((const char*)*buffer);