Changeset 887


Ignore:
Timestamp:
07/22/19 01:14:17 (4 weeks ago)
Author:
Maciej Komosinski
Message:

StringFILE::Vwrite() returns a proper value now as the standard requires

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpp/common/virtfile/stringfile.h

    r720 r887  
    1818        StringFILE(string& s,int _pos=0): VirtFILE(""), str(s), pos(_pos) {}
    1919        size_t Vread(void *ptr, size_t size, size_t nmemb);
    20         size_t Vwrite(const void *ptr, size_t size, size_t nmemb) { str.append((const char*)ptr, (int)(size*nmemb)); return size*nmemb; }
     20        size_t Vwrite(const void *ptr, size_t size, size_t nmemb) { str.append((const char*)ptr, (int)(size*nmemb)); return nmemb; }
    2121        int Veof() { return pos >= int(str.size()); }
    2222        int Vputc(int c) { str += (char)c; return c; }
Note: See TracChangeset for help on using the changeset viewer.