diff --git a/src/sbbs3/main.cpp b/src/sbbs3/main.cpp
index 295646ac2dbc1299cc179d54b42728d501149ad4..919fe68f41cad18b46e40e512d6b547f20203aa5 100644
--- a/src/sbbs3/main.cpp
+++ b/src/sbbs3/main.cpp
@@ -126,6 +126,8 @@ js_printf(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
 	if((fmt = JS_ValueToString(cx, argv[0]))==NULL)
 		return(JS_FALSE);
 
+	memset(arglist,0,sizeof(arglist));	// Initialize arglist to NULLs
+
     for (i = 1; i < argc && i<sizeof(arglist)/sizeof(arglist[0]); i++) {
 		if(JSVAL_IS_STRING(argv[i])) {
 			if((str=JS_ValueToString(cx, argv[i]))==NULL)