diff --git a/sicvar.c b/sicvar.c index 7d2ffc33..be6d8e07 100644 --- a/sicvar.c +++ b/sicvar.c @@ -240,7 +240,7 @@ int VarSetFloat(pSicsVariable self, float fNew, int iUserRights) if (self->iAccessCode < iUserRights) { return 0; - } else { + } else if (self->fVal != fNew) { self->fVal = fNew; InvokeCallBack(self->pCall, VALUECHANGE, self); tracePar(self->name,"%f",fNew); @@ -256,7 +256,7 @@ int VarSetInt(pSicsVariable self, int iNew, int iUserRights) if (self->iAccessCode < iUserRights) { return 0; - } else { + } else if (self->iVal != iNew) { self->iVal = iNew; InvokeCallBack(self->pCall, VALUECHANGE, self); tracePar(self->name,"%d",iNew); @@ -272,7 +272,7 @@ int VarSetText(pSicsVariable self, char *pNew, int iUserRights) if (self->iAccessCode < iUserRights) { return 0; - } else { + } else if (self->text && strcmp(self->text, pNew)) { if (self->text) { free(self->text); }