diff --git a/src/engine/render/shaderparam.cpp b/src/engine/render/shaderparam.cpp index b1f9be9a6..4678226bd 100644 --- a/src/engine/render/shaderparam.cpp +++ b/src/engine/render/shaderparam.cpp @@ -36,7 +36,7 @@ GlobalShaderParamState &GlobalShaderParam::getglobalparam(const std::string &nam else { GlobalShaderParamState ¶m = globalparams[name]; - std::memset(param.buf, -1, sizeof(param.buf)); + param.buf.fill(-1); param.version = -1; return param; } diff --git a/src/engine/render/shaderparam.h b/src/engine/render/shaderparam.h index 2ba68dbb0..70f319f8d 100644 --- a/src/engine/render/shaderparam.h +++ b/src/engine/render/shaderparam.h @@ -16,7 +16,7 @@ struct GlobalShaderParamState float fval[32]; int ival[32]; uint uval[32]; - uchar buf[32*sizeof(float)]; + std::array buf; }; int version;