- Joined
- May 15, 2012
- Messages
- 378
- Motherboard
- Ignore me
- CPU
- I'm Ignoring
- Graphics
- Forum RULES !!!
- Mac
- Classic Mac
- Mobile Phone
Okay,
Yes thats it.
Yes thats it.
if (embed[0] != '<' && argc == 1) {
argv[1] = malloc(sizeof(embed));
argv[2] = malloc(sizeof(embed));
argv[3] = malloc(sizeof(embed));
argv[4] = malloc(sizeof(embed));
If you check the memory addresses of argv, this really isn't an issue,
and you can confirm that by running it yourself. If you're really concerned, you could allocate another array on the stack, using it throughout, and remapping argv into it in the manually-entered case. Otherwise I wouldn't bother.