projects
/
citadel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
d0a0f80
)
* ParsePref() was passing NULL values to the target buffer of the string tokenizer...
author
Art Cancro
<ajc@citadel.org>
Wed, 21 Jan 2009 04:48:37 +0000
(
04:48
+0000)
committer
Art Cancro
<ajc@citadel.org>
Wed, 21 Jan 2009 04:48:37 +0000
(
04:48
+0000)
webcit/preferences.c
patch
|
blob
|
history
diff --git
a/webcit/preferences.c
b/webcit/preferences.c
index fae98f03a8bfeb0fd2cf2e4b9bc00a3986389ab8..860bafa0a3de99148f06576b11c8975f1649be3d 100644
(file)
--- a/
webcit/preferences.c
+++ b/
webcit/preferences.c
@@
-121,6
+121,8
@@
void ParsePref(HashList **List, StrBuf *ReadBuf)
else {
LastData = Data = malloc(sizeof(Preference));
memset(Data, 0, sizeof(Preference));
else {
LastData = Data = malloc(sizeof(Preference));
memset(Data, 0, sizeof(Preference));
+ Data->Key = NewStrBuf();
+ Data->Val = NewStrBuf();
StrBufExtract_token(Data->Key, ReadBuf, 0, '|');
StrBufExtract_token(Data->Val, ReadBuf, 1, '|');
if (!IsEmptyStr(ChrPtr(Data->Key)))
StrBufExtract_token(Data->Key, ReadBuf, 0, '|');
StrBufExtract_token(Data->Val, ReadBuf, 1, '|');
if (!IsEmptyStr(ChrPtr(Data->Key)))
@@
-153,8
+155,7
@@
void load_preferences(void)
char buf[SIZ];
long msgnum = 0L;
char buf[SIZ];
long msgnum = 0L;
- if (!goto_config_room())
- return;
+ if (goto_config_room() != 0) return; /* oh well. */
ReadBuf = NewStrBuf();
serv_puts("MSGS ALL|0|1");
ReadBuf = NewStrBuf();
serv_puts("MSGS ALL|0|1");