diff options
Diffstat (limited to 'generic/Track.c')
-rw-r--r-- | generic/Track.c | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/generic/Track.c b/generic/Track.c index 8fb3e0c..911a2c0 100644 --- a/generic/Track.c +++ b/generic/Track.c @@ -1976,16 +1976,13 @@ ZnSendTrackToOm(void *ptr, ********************************************************************************** */ void -ZnSetLabelAngleFromOm(void *ptr, /* No longer in use. */ - void *item, - int rho, - int theta -#ifdef OM_TECH - , char *reason /* Technical data explaining algorithm processing */ -#endif - ) +ZnSetLabelAngleFromOm(void *ptr, /* No longer in use. */ + void *item, + int rho, + int theta, + char *reason) /* Technical data explaining algorithm processing */ { - TrackItem track = (TrackItem) item; + TrackItem track = (TrackItem) item; theta %= 360; if (theta < 0) { @@ -2002,10 +1999,12 @@ ZnSetLabelAngleFromOm(void *ptr, /* No longer in use. */ } #ifdef OM_TECH /* Setup reason regardless of redrawing options. */ - if (!track->omtechstuff) { - track->omtechstuff = ZnMalloc( (OMTECHSTUFFLEN + 1) * sizeof(char)); + if (reason) { + if (!track->omtechstuff) { + track->omtechstuff = ZnMalloc( (OMTECHSTUFFLEN + 1) * sizeof(char)); + } + strncpy(track->omtechstuff, reason, OMTECHSTUFFLEN); } - strncpy(track->omtechstuff, reason, OMTECHSTUFFLEN); #endif } |