summaryrefslogtreecommitdiff
path: root/gnucash.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gnucash.cc')
-rw-r--r--gnucash.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/gnucash.cc b/gnucash.cc
index 02604c55..2e4cb911 100644
--- a/gnucash.cc
+++ b/gnucash.cc
@@ -286,8 +286,8 @@ static void dataHandler(void *userData, const char *s, int len)
bool gnucash_parser_t::test(std::istream& in) const
{
- char buf[128];
- in.getline(buf, 127);
+ char buf[5];
+ in.read(buf, 5);
in.seekg(0, std::ios::beg);
return std::strncmp(buf, "<?xml", 5) == 0;