projects
/
u
/
mdw
/
putty
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix assertion failure in wprefs() when the list is zero-length. Breaks
[u/mdw/putty]
/
misc.c
diff --git
a/misc.c
b/misc.c
index
3a27572
..
cf97c04
100644
(file)
--- a/
misc.c
+++ b/
misc.c
@@
-102,7
+102,7
@@
prompts_t *new_prompts(void *frontend)
void add_prompt(prompts_t *p, char *promptstr, int echo, size_t len)
{
prompt_t *pr = snew(prompt_t);
void add_prompt(prompts_t *p, char *promptstr, int echo, size_t len)
{
prompt_t *pr = snew(prompt_t);
-
unsigned char *result = snewn(len, unsigned
char);
+
char *result = snewn(len,
char);
pr->prompt = promptstr;
pr->echo = echo;
pr->result = result;
pr->prompt = promptstr;
pr->echo = echo;
pr->result = result;
@@
-605,7
+605,7
@@
void debug_memdump(void *buf, int len, int L)
if (L) {
int delta;
debug_printf("\t%d (0x%x) bytes:\n", len, len);
if (L) {
int delta;
debug_printf("\t%d (0x%x) bytes:\n", len, len);
- delta = 15 & (int) p;
+ delta = 15 & (
unsigned long
int) p;
p -= delta;
len += delta;
}
p -= delta;
len += delta;
}
@@
-635,21
+635,21
@@
void debug_memdump(void *buf, int len, int L)
#endif /* def DEBUG */
/*
#endif /* def DEBUG */
/*
- * Determine whether or not a Conf
ig structure represents a sessio
n
- *
which can
sensibly be launched right now.
+ * Determine whether or not a Conf
represents a session which ca
n
+ * sensibly be launched right now.
*/
*/
-int c
fg_launchable(const Config *cfg
)
+int c
onf_launchable(Conf *conf
)
{
{
- if (c
fg->protocol
== PROT_SERIAL)
- return c
fg->serline
[0] != 0;
+ if (c
onf_get_int(conf, CONF_protocol)
== PROT_SERIAL)
+ return c
onf_get_str(conf, CONF_serline)
[0] != 0;
else
else
- return c
fg->host
[0] != 0;
+ return c
onf_get_str(conf, CONF_host)
[0] != 0;
}
}
-char const *c
fg_dest(const Config *cfg
)
+char const *c
onf_dest(Conf *conf
)
{
{
- if (c
fg->protocol
== PROT_SERIAL)
- return c
fg->serline
;
+ if (c
onf_get_int(conf, CONF_protocol)
== PROT_SERIAL)
+ return c
onf_get_str(conf, CONF_serline)
;
else
else
- return c
fg->host
;
+ return c
onf_get_str(conf, CONF_host)
;
}
}