From 7f3e62e45633ae12a86456c48ed7857adbe398cd Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Sun, 28 Apr 2024 06:16:59 +0300 Subject: [PATCH] public: remove unneeded copy in Q_atov --- public/crtlib.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/public/crtlib.c b/public/crtlib.c index bf6ab578..17ab95fa 100644 --- a/public/crtlib.c +++ b/public/crtlib.c @@ -253,13 +253,11 @@ float Q_atof( const char *str ) void Q_atov( float *vec, const char *str, size_t siz ) { - string buffer; - char *pstr, *pfront; + const char *pstr, *pfront; int j; - Q_strncpy( buffer, str, sizeof( buffer )); memset( vec, 0, sizeof( vec_t ) * siz ); - pstr = pfront = buffer; + pstr = pfront = str; for( j = 0; j < siz; j++ ) {