summaryrefslogtreecommitdiffstats
path: root/RISCOS/Python/dynload_riscos.c
diff options
context:
space:
mode:
Diffstat (limited to 'RISCOS/Python/dynload_riscos.c')
-rw-r--r--RISCOS/Python/dynload_riscos.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/RISCOS/Python/dynload_riscos.c b/RISCOS/Python/dynload_riscos.c
index 6965647..6b87f2d 100644
--- a/RISCOS/Python/dynload_riscos.c
+++ b/RISCOS/Python/dynload_riscos.c
@@ -55,10 +55,9 @@ dl_funcptr _PyImport_GetDynLoadFunc(const char *fqname, const char *shortname,
void (*init_function)(void);
err = dlk_load_no_init(pathname, &init_function);
- if (err)
- {
- sprintf(errstr, "dlk failure %d", err);
- PyErr_SetString(PyExc_ImportError, errstr);
+ if (err) {
+ PyOS_snprintf(errstr, sizeof(errstr), "dlk failure %d", err);
+ PyErr_SetString(PyExc_ImportError, errstr);
}
return init_function;
}