changed returned text in noOutput to same but allocated text
it could possibly cause deallocattion problems
This commit is contained in:
parent
ad15dce494
commit
86c8460615
@ -1,5 +1,7 @@
|
||||
#include <why2/flags.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
unsigned long getKeyLength()
|
||||
{
|
||||
return keyLength;
|
||||
@ -12,7 +14,12 @@ inputFlags noFlags()
|
||||
|
||||
outputFlags noOutput(unsigned char exitCode)
|
||||
{
|
||||
return (outputFlags) {"", "", 0, 0, exitCode};
|
||||
char *empty1 = malloc(1);
|
||||
char *empty2 = malloc(1);
|
||||
empty1[0] = '\0';
|
||||
empty2[0] = '\0';
|
||||
|
||||
return (outputFlags) { empty1, empty2, 0, 0, exitCode };
|
||||
}
|
||||
|
||||
void setKeyLength(int keyLengthNew)
|
||||
|
Loading…
x
Reference in New Issue
Block a user