catch null payload

This commit is contained in:
Jan-Piet Mens
2016-07-20 10:50:43 +02:00
parent 080bb52c5b
commit f6b2091eca
+6 -1
View File
@@ -608,7 +608,12 @@ double haversine_dist(double th1, double ph1, double th2, double ph2)
void chomp(char *s)
{
char *p = s + strlen(s) - 1;
char *p;
if (!s || *s == 0)
return;
p = s + strlen(s) - 1;
while (isspace(*p)) {
*p-- = 0;