freebsd-ports/misc/astrolog/files/patch-charts1.c
Andrey A. Chernov eb0925e19a Sanitize Name and Location given in the command line.
Fix the bug with 8bit chars in the Name & Location in the text output.
2007-06-23 14:20:21 +00:00

20 lines
671 B
C

--- charts1.c.bak 1998-12-23 23:29:26.000000000 +0300
+++ charts1.c 2007-06-23 16:28:33.000000000 +0400
@@ -53,7 +53,7 @@
char sz[cchSzDef];
int day, fNam, fLoc;
- fNam = *ciMain.nam > chNull; fLoc = *ciMain.loc > chNull;
+ fNam = *ciMain.nam != chNull; fLoc = *ciMain.loc != chNull;
AnsiColor(kWhite);
sprintf(sz, "%s %s chart ", szAppName, szVersionCore); PrintSz(sz);
if (fNoTimeOrSpace)
@@ -83,7 +83,7 @@
real rT;
CreateElemTable(&et);
- fNam = *ciMain.nam > chNull; fLoc = *ciMain.loc > chNull;
+ fNam = *ciMain.nam != chNull; fLoc = *ciMain.loc != chNull;
PrintHeader(); /* Show time and date of the chart being displayed. */