Skip to content

% will be converted to . #2672

Description

@YuanBaian

static char *MSG_ReadStringExt( sizebuf_t *sb, qboolean bLine )
{
static char string[4096];
int l = 0;

do
{
	// use MSG_ReadByte so -1 is out of bounds
	int c = MSG_ReadByte( sb );

	if( c == 0 ) break;
	else if( bLine && c == '\n' )
		break;

	// translate all fmt spec to avoid crash bugs
	// NOTE: but game strings leave unchanged. see pfnWriteString for details
	if( c == '%' ) c = '.'; // <=========================Why do this?

	string[l] = c;
	l++;
} while( l < sizeof( string ) - 1 );
string[l] = 0; // terminator

return string;

}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions