summaryrefslogtreecommitdiff
path: root/src/xmlcomposer.cpp
diff options
context:
space:
mode:
authorStef Walter <stef@memberwebs.com>2004-03-31 22:25:56 +0000
committerStef Walter <stef@memberwebs.com>2004-03-31 22:25:56 +0000
commit7f4650080fed53e793c6b3754e6f24c13b8e4539 (patch)
tree1a34083f59731ddb2201ab2aaa74f65257496acb /src/xmlcomposer.cpp
parent824c9753297f8b62fca9aef13b1b6b9393a6d934 (diff)
Changes for FreeBSD compatibility
Diffstat (limited to 'src/xmlcomposer.cpp')
-rw-r--r--src/xmlcomposer.cpp15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/xmlcomposer.cpp b/src/xmlcomposer.cpp
index b0643e2..80d45af 100644
--- a/src/xmlcomposer.cpp
+++ b/src/xmlcomposer.cpp
@@ -1044,16 +1044,15 @@ bool RtfParser::isEqualElement(const DOM::Element& el1, const DOM::Element& el2)
wstring RtfParser::formatInt(int num)
{
- wchar_t buff[12];
+ char buff[16];
- // The Win32 version isn't secure
-#ifdef _WIN32
- swprintf(buff, L"%d", num);
-#else
- swprintf(buff, 12, L"%d", num);
-#endif
+ // Certain OSs don't support swprintf :(
+ sprintf(buff, "%d", num);
+
+ wstring n;
+ for(char* s = buff; *s; s++)
+ n.append(1, *s);
- wstring n(buff);
return n;
}