From 677385b07c489ace6b7057a95a3260a341edfdff Mon Sep 17 00:00:00 2001 From: "Johan B. C. Engelen" Date: Mon, 14 Apr 2014 22:38:32 +0200 Subject: patch by Gellule, fixes wrong parsing of style, work-around for bug in libc++ Fixed bugs: - https://launchpad.net/bugs/1300271 (bzr r13285) --- src/xml/repr-css.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/xml/repr-css.cpp') diff --git a/src/xml/repr-css.cpp b/src/xml/repr-css.cpp index 24e2db9e1..32a1e7f5d 100644 --- a/src/xml/repr-css.cpp +++ b/src/xml/repr-css.cpp @@ -382,7 +382,10 @@ static void sp_repr_css_merge_from_decl(SPCSSAttr *css, CRDeclaration const *con std::string characters; std::string temp; bool number_valid = !(ss >> number).fail(); - if( !number_valid ) ss.clear(); + if (!number_valid) { + ss.clear(); + ss.seekg(0); // work-around for a bug in libc++ (see lp:1300271) + } while( !(ss >> temp).eof() ) { characters += temp; characters += " "; -- cgit v1.2.3