If you're in here, want to reimplement this thing in a few lines of
scanf(%s) and strcasecmp()? I can give it a go if you don't want to.
I think it is better that moving it to utils.c because the other commands
may use it in the future.
I disagree. Let's stick to only writing the code
If an array is 5 chars in size:
char answer[5];
and we write the 6th char (counting from 0)...
answer[5] = '\0';
we get problems:
cmds-chunk.c: In function 'ask_user.clone.0':
cmds-chunk.c:1343: warning: array subscript is above array bounds
Fix it...
Signed-off-by: Eric
On mon, 05 Aug 2013 21:52:57 -0500, Eric Sandeen wrote:
If an array is 5 chars in size:
char answer[5];
and we write the 6th char (counting from 0)...
answer[5] = '\0';
we get problems:
cmds-chunk.c: In function 'ask_user.clone.0':
cmds-chunk.c:1343: warning:
On Mon, Aug 05, 2013 at 09:52:57PM -0500, Eric Sandeen wrote:
If an array is 5 chars in size:
char answer[5];
and we write the 6th char (counting from 0)...
answer[5] = '\0';
*high fives*
- answer[5] = '\0';
+ answer[4] = '\0';
I went to see which way of
On 8/5/13 10:57 PM, Zach Brown wrote:
On Mon, Aug 05, 2013 at 09:52:57PM -0500, Eric Sandeen wrote:
If an array is 5 chars in size:
char answer[5];
and we write the 6th char (counting from 0)...
answer[5] = '\0';
*high fives*
-answer[5] = '\0';
+answer[4] =
On Mon, 5 Aug 2013 20:57:57 -0700, Zach Brown wrote:
On Mon, Aug 05, 2013 at 09:52:57PM -0500, Eric Sandeen wrote:
If an array is 5 chars in size:
char answer[5];
and we write the 6th char (counting from 0)...
answer[5] = '\0';
*high fives*
-answer[5] = '\0';
+