Posts: 7,801
Threads: 187
Joined: Feb 2010
Reputation:
0
LarzI, you have to account for the null terminator. An IP address can be 16 cells, so then you add "unban" which is 21, the space between unban and the IP, then an additional cell for the null terminator.
So, the cell size should be 23.
Posts: 2,628
Threads: 32
Joined: Apr 2007
Reputation:
0
Oh spare me, you know as well as everyone else that it was a typ0. 16 + 6 = 22, obviously.
Posts: 558
Threads: 59
Joined: Jun 2012
Reputation:
0
255.255.255.255 = 15 so that means an ip can be max 15 characters or less, so if you make max ip + the space + /unbanip = 7 letters + space = 8 letters, so string must be 15 + 8 = 23
Posts: 2,628
Threads: 32
Joined: Apr 2007
Reputation:
0
And all strings are zero-terminated, which means they all end with an additional character: '\0' (Null) thus making it 24.