From d3ce7adc95eab61b434962cb7fbe3c9a22bb3d36 Mon Sep 17 00:00:00 2001 From: Richard Harrison Date: Sun, 28 Apr 2019 19:25:11 +0200 Subject: [PATCH] NasalTimers; ensure unique name as this is required to identify the timer for certain operations (e.g. stop) --- src/Scripting/NasalSys.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Scripting/NasalSys.cxx b/src/Scripting/NasalSys.cxx index 42072d65b..871bac981 100644 --- a/src/Scripting/NasalSys.cxx +++ b/src/Scripting/NasalSys.cxx @@ -99,9 +99,9 @@ public: _self(self), _interval(interval) { - char nm[128]; + char nm[256]; if (c) { - snprintf(nm, 128, "maketimer-%s:%d", naStr_data(naGetSourceFile(c, 0)), naGetLine(c, 0)); + snprintf(nm, 128, "maketimer-[%p]-%s:%d", (void*)this, naStr_data(naGetSourceFile(c, 0)), naGetLine(c, 0)); } else { snprintf(nm, 128, "maketimer-%p", this);