From 63f5977aaed661f6176daca101680bfcd80e80ec Mon Sep 17 00:00:00 2001 From: JackCarterSmith Date: Fri, 19 Aug 2022 19:01:53 +0200 Subject: [PATCH] sprintf_s unix compatible fix --- obj.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/obj.c b/obj.c index 85dbc9c..4109b33 100644 --- a/obj.c +++ b/obj.c @@ -2451,18 +2451,18 @@ void obj_write(const obj *O, const char *obj, const char *mtl, const char *outPa if (obj) { if (outPath != NULL) - sprintf_s(objPath, MAXSTR, EXPORT_FORMAT, outPath, obj); + snprintf(objPath, MAXSTR, EXPORT_FORMAT, outPath, obj); else - sprintf_s(objPath, MAXSTR, "%s", obj); + snprintf(objPath, MAXSTR, "%s", obj); obj_write_obj(O, objPath, mtl, prec); } if (mtl) { if (outPath != NULL) - sprintf_s(mtlPath, MAXSTR, EXPORT_FORMAT, outPath, mtl); + snprintf(mtlPath, MAXSTR, EXPORT_FORMAT, outPath, mtl); else - sprintf_s(mtlPath, MAXSTR, "%s", mtl); + snprintf(mtlPath, MAXSTR, "%s", mtl); obj_write_mtl(O, mtlPath); }