|
@@ -5660,7 +5660,7 @@ int32 npc_parsesrcfile(const char* filepath)
|
|
|
|
|
|
// fill w1
|
|
|
if( pos[3]-pos[2] > ARRAYLENGTH(w1)-1 )
|
|
|
- ShowWarning("npc_parsesrcfile: w1 truncated, too much data (%d) in file '%s', line '%d'.\n", pos[3]-pos[2], filepath, strline(buffer,p-buffer));
|
|
|
+ ShowWarning("npc_parsesrcfile: w1 truncated, too much data (%" PRIuPTR ") in file '%s', line '%d'.\n", pos[3]-pos[2], filepath, strline(buffer,p-buffer));
|
|
|
|
|
|
size_t index = std::min( pos[3] - pos[2], ARRAYLENGTH( w1 ) - 1 );
|
|
|
memcpy( w1, p + pos[2], index * sizeof( char ) );
|
|
@@ -5668,7 +5668,7 @@ int32 npc_parsesrcfile(const char* filepath)
|
|
|
|
|
|
// fill w2
|
|
|
if( pos[5]-pos[4] > ARRAYLENGTH(w2)-1 )
|
|
|
- ShowWarning("npc_parsesrcfile: w2 truncated, too much data (%d) in file '%s', line '%d'.\n", pos[5]-pos[4], filepath, strline(buffer,p-buffer));
|
|
|
+ ShowWarning("npc_parsesrcfile: w2 truncated, too much data (%" PRIuPTR ") in file '%s', line '%d'.\n", pos[5]-pos[4], filepath, strline(buffer,p-buffer));
|
|
|
|
|
|
index = std::min( pos[5] - pos[4], ARRAYLENGTH( w2 ) - 1 );
|
|
|
memcpy( w2, p + pos[4], index * sizeof( char ) );
|
|
@@ -5676,7 +5676,7 @@ int32 npc_parsesrcfile(const char* filepath)
|
|
|
|
|
|
// fill w3
|
|
|
if( pos[7]-pos[6] > ARRAYLENGTH(w3)-1 )
|
|
|
- ShowWarning("npc_parsesrcfile: w3 truncated, too much data (%d) in file '%s', line '%d'.\n", pos[7]-pos[6], filepath, strline(buffer,p-buffer));
|
|
|
+ ShowWarning("npc_parsesrcfile: w3 truncated, too much data (%" PRIuPTR ") in file '%s', line '%d'.\n", pos[7]-pos[6], filepath, strline(buffer,p-buffer));
|
|
|
|
|
|
index = std::min( pos[7] - pos[6], ARRAYLENGTH( w3 ) - 1 );
|
|
|
memcpy( w3, p + pos[6], index * sizeof( char ) );
|
|
@@ -5684,7 +5684,7 @@ int32 npc_parsesrcfile(const char* filepath)
|
|
|
|
|
|
// fill w4 (to end of line)
|
|
|
if( pos[1]-pos[8] > ARRAYLENGTH(w4)-1 )
|
|
|
- ShowWarning("npc_parsesrcfile: w4 truncated, too much data (%d) in file '%s', line '%d'.\n", pos[1]-pos[8], filepath, strline(buffer,p-buffer));
|
|
|
+ ShowWarning("npc_parsesrcfile: w4 truncated, too much data (%" PRIuPTR ") in file '%s', line '%d'.\n", pos[1]-pos[8], filepath, strline(buffer,p-buffer));
|
|
|
if (pos[8] != -1) {
|
|
|
index = std::min( pos[1] - pos[8], ARRAYLENGTH( w4 ) - 1 );
|
|
|
memcpy( w4, p + pos[8], index * sizeof( char ) );
|