Fix warnings in emucore

This commit is contained in:
Nekotekina Aux1 2020-03-04 17:08:40 +03:00 committed by Nekotekina
parent f2f3321952
commit 250736ece5
48 changed files with 189 additions and 193 deletions

View file

@ -10,6 +10,7 @@
#include "Utilities/StrUtil.h"
#include "Utilities/lockless.h"
#include "Utilities/span.h"
LOG_CHANNEL(cellSysutil);
@ -348,8 +349,8 @@ error_code cellSysutilGetSystemParamString(CellSysutilParamId id, vm::ptr<char>
cellSysutil.error("cellSysutilGetSystemParamString: Unknown ParamId 0x%x", id);
}
std::strncpy(buf.get_ptr(), param_str.c_str(), copy_size - 1);
buf[copy_size - 1] = '\0';
gsl::span dst(buf.get_ptr(), copy_size);
strcpy_trunc(dst, param_str);
return CELL_OK;
}