Changeset 348 for cpp/frams/virtfile
- Timestamp:
- 04/09/15 23:51:28 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cpp/frams/virtfile/stringfile.cpp
r295 r348 13 13 int need = (int)(size*nmemb); 14 14 if (need > have) { nmemb = have / size; need = (int)(size*nmemb); } 15 memcpy(ptr, ((const char*)str) + pos, need);15 memcpy(ptr, str.c_str() + pos, need); 16 16 pos += need; 17 17 return nmemb; … … 32 32 if (size < 0) size = 0; 33 33 if (have > size) have = size - 1; 34 const char* src = ((const char*)str) + pos;34 const char* src = str.c_str() + pos; 35 35 char *dest = s; 36 36 while (have-- > 0)
Note: See TracChangeset
for help on using the changeset viewer.