From 58763f090043be8709addc9a7ac33aeaab591d7c Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Mon, 1 Oct 2012 13:36:56 +0100 Subject: Fix stamp library loading issue (wasn't loading beyond 512 bytes, readsome doesn't always reach eof before not reading n diff --git a/src/client/Client.cpp b/src/client/Client.cpp index 0353d0e..238c216 100644 --- a/src/client/Client.cpp +++ b/src/client/Client.cpp @@ -127,12 +127,11 @@ void Client::Initialise(std::string proxyString) //Read stamps library std::ifstream stampsLib; stampsLib.open(STAMPS_DIR PATH_SEP "stamps.def", std::ios::binary); - while(true) + while(!stampsLib.eof()) { char data[11]; memset(data, 0, 11); - if(stampsLib.readsome(data, 10)!=10) - break; + stampsLib.read(data, 10); if(!data[0]) break; stampIDs.push_back(data); -- cgit v0.9.2-21-gd62e