blob: cc5cf3775920f1ea90cee4ae92b8975efc98ec2f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
diff --git a/src/zone_nr.c b/src/zone_nr.c
index c7e2a33..805bd4e 100644
--- a/src/zone_nr.c
+++ b/src/zone_nr.c
@@ -20,11 +20,14 @@
* get zone number
*
*--------------------------------------------------------------*/
-
+#include "string.h"
int zone_nr(char *comment) {
int z = 0;
+ if (strlen(comment) < 2)
+ return z;
+
if (comment[0] <= 57 && comment[0] >= 48)
z = (comment[0] - 48) * 10;
if (comment[1] <= 57 && comment[1] >= 48)
|