Skip to content

Commit 0146185

Browse files
committed
Type mismatch on a 64bit platforms has been fixed.
1 parent 5dfb0cb commit 0146185

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

ccutil/genericvector.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ inline bool LoadDataFromFile(const STRING& filename,
361361
size_t size = ftell(fp);
362362
fseek(fp, 0, SEEK_SET);
363363
// Pad with a 0, just in case we treat the result as a string.
364-
data->init_to_size(size + 1, 0);
364+
data->init_to_size((int)size + 1, 0);
365365
bool result = fread(&(*data)[0], 1, size, fp) == size;
366366
fclose(fp);
367367
return result;

ccutil/helpers.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ class TRand {
7373

7474
// Remove newline (if any) at the end of the string.
7575
inline void chomp_string(char *str) {
76-
int last_index = strlen(str) - 1;
76+
int last_index = (int)strlen(str) - 1;
7777
while (last_index >= 0 &&
7878
(str[last_index] == '\n' || str[last_index] == '\r')) {
7979
str[last_index--] = '\0';

0 commit comments

Comments
 (0)