From f67b97e63cc569e5ba1105030ce9e6ed21cf6386 Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Sat, 15 Apr 2023 02:56:14 +0300 Subject: [PATCH] engine: common: mod_bmodel: remove useless copy before Q_strnlwr, as Q_strnlwr already copies string --- engine/common/mod_bmodel.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/engine/common/mod_bmodel.c b/engine/common/mod_bmodel.c index 112110a0..e2608486 100644 --- a/engine/common/mod_bmodel.c +++ b/engine/common/mod_bmodel.c @@ -2145,8 +2145,7 @@ static void Mod_LoadTexture( dbspmodel_t *bmod, int textureIndex ) loadmodel->textures[textureIndex] = texture; // Ensure texture name is lowercase. - Q_strncpy( texture->name, mipTex->name, sizeof( texture->name )); - Q_strnlwr( texture->name, texture->name, sizeof( texture->name )); + Q_strnlwr( mipTex->name, texture->name, sizeof( texture->name )); texture->width = mipTex->width; texture->height = mipTex->height;