sharedspice.c, NS Windows, use only POSIX compliant snprintf

make OldAn a zero terminated string
This commit is contained in:
Holger Vogt 2018-12-15 10:36:09 +01:00
parent 0828a8e706
commit 2a2a7c2d36
1 changed files with 3 additions and 5 deletions

View File

@ -148,10 +148,6 @@ static bool cont_condition;
#include "misc/ivars.h"
#include "frontend/resource.h"
#include "frontend/com_measure2.h"
#ifdef _MSC_VER
#include <stdio.h>
#define snprintf _snprintf
#endif
#include "frontend/outitf.h"
#include "ngspice/memory.h"
#include "frontend/com_measure2.h"
@ -435,7 +431,7 @@ sighandler_sharedspice(int num)
/* create a suspended thread tid2 that is activated when bg_run has finished.
It executes the .control commands. If the arguemnt is NULL, the thread is
stated with the existing controls (e.g. for command 'reset'. */
started with the existing controls (e.g. during command 'reset'. */
void
exec_controls(wordlist *newcontrols)
{
@ -1635,6 +1631,8 @@ void SetAnalyse(
if (nostatuswanted)
return;
OldAn[0] = '\0';
if ((DecaPercent == OldPercent) && !strcmp(OldAn, Analyse))
return;