1
0
Fork 0

NasalTimers; ensure unique name as this is required to identify the timer for certain operations (e.g. stop)

This commit is contained in:
Richard Harrison 2019-04-28 19:25:11 +02:00
parent d2a179f1f3
commit d3ce7adc95

View file

@ -99,9 +99,9 @@ public:
_self(self), _self(self),
_interval(interval) _interval(interval)
{ {
char nm[128]; char nm[256];
if (c) { 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 { else {
snprintf(nm, 128, "maketimer-%p", this); snprintf(nm, 128, "maketimer-%p", this);