summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
a1594e4)
session list even if it isn't in the Registry. This got deleted
overenthusiastically because I didn't have a comment explaining what
it was doing there. Now there's a comment, so I probably won't
remove it again.
git-svn-id: svn://svn.tartarus.org/sgt/putty@733
cda61777-01e9-0310-a592-
d414129be87e
buffer = srealloc(buffer, buflen+1);
buffer[buflen] = '\0';
buffer = srealloc(buffer, buflen+1);
buffer[buflen] = '\0';
+ /*
+ * Now set up the list of sessions. Note that "Default
+ * Settings" must always be claimed to exist, even if it
+ * doesn't really.
+ */
+
+ nsessions = 1; /* "Default Settings" counts as one */
+ if (strcmp(p, "Default Settings"))
+ nsessions++;
- sessions = smalloc(nsessions * sizeof(char *));
+ sessions = smalloc((nsessions+1) * sizeof(char *));
+ sessions[0] = "Default Settings";
+ if (strcmp(p, "Default Settings"))
+ sessions[i++] = p;