sprintf_s gcc compatible fix
All checks were successful
JCS-Prod/RSE-Model/pipeline/pr-master This commit looks good

This commit is contained in:
JackCarterSmith 2022-08-19 19:03:11 +02:00
parent c5589c0199
commit f1ea3fc372
Signed by: JackCarterSmith
GPG Key ID: 832E52F4E23F8F24
3 changed files with 6 additions and 6 deletions

View File

@ -150,7 +150,7 @@ static void createSubDir(char *dirName) {
if (dirName == NULL) return;
char _dir[1024];
sprintf_s(_dir, 1024, "%s-out", dirName);
snprintf(_dir, 1024, "%s-out", dirName);
#ifdef _WIN32
CreateDirectory(_dir, NULL);

@ -1 +1 @@
Subproject commit 09f87160bb80d1ad331c697000ecd7a122f9ef60
Subproject commit 63f5977aaed661f6176daca101680bfcd80e80ec

View File

@ -32,12 +32,12 @@ unsigned char exportOBJModel(T_RSPMODEL_OBJECT* hob_objects, const char *out_pat
return RSPLIB_ERROR_ARGS_NULL;
#ifdef _WIN32
sprintf_s(exportPath, 1024, "%s-out\\", out_path, hob_objects->name);
snprintf(exportPath, 1024, "%s-out\\", out_path);
#else
sprintf_s(exportPath, 1024, "%s-out/", out_path, hob_objects->name);
snprintf(exportPath, 1024, "%s-out/", out_path);
#endif
sprintf_s(objExport_name, 128, "%s.obj", hob_objects->name);
sprintf_s(mtlExport_name, 128, "%s.mtl", hob_objects->name);
snprintf(objExport_name, 128, "%s.obj", hob_objects->name);
snprintf(mtlExport_name, 128, "%s.mtl", hob_objects->name);
objConstruct = obj_create(NULL);