make the contents able to be any data, the previous stopped at white space
This commit is contained in:
11
src/main.c
11
src/main.c
@@ -762,13 +762,12 @@ static int formparse(char *input,
|
|||||||
char *sep;
|
char *sep;
|
||||||
char *sep2;
|
char *sep2;
|
||||||
|
|
||||||
/* Preallocate contents to the length of input to make sure we don't
|
if((1 == sscanf(input, "%255[^=]=", name)) &&
|
||||||
overwrite anything. */
|
(contp = strchr(input, '='))) {
|
||||||
contents = malloc(strlen(input));
|
|
||||||
contents[0] = '\000';
|
|
||||||
|
|
||||||
if(1 <= sscanf(input, "%255[^=]=%s", name, contents)) {
|
|
||||||
/* the input was using the correct format */
|
/* the input was using the correct format */
|
||||||
|
|
||||||
|
/* Allocate the contents */
|
||||||
|
contents = strdup(contp+1);
|
||||||
contp = contents;
|
contp = contents;
|
||||||
|
|
||||||
if('@' == contp[0]) {
|
if('@' == contp[0]) {
|
||||||
|
|||||||
Reference in New Issue
Block a user