* a small bug in drawterm
@ 2016-04-13 10:08 arisawa
2016-04-14 23:58 ` [9front] " cinap_lenrek
0 siblings, 1 reply; 2+ messages in thread
From: arisawa @ 2016-04-13 10:08 UTC (permalink / raw)
To: 9front
hello,
in drawterm/cpu.c, we have
if(readstr(fd, buf, sizeof buf) < 0)
fatal(1, "cannot read OK in p9any: got %d %s", n, buf);
perhaps this is intended to be
if((n = readstr(fd, buf, sizeof buf)) < 0)
fatal(1, "cannot read OK in p9any: got %d %s", n, buf);
but the latter is no help. readstr() returns 0 or -1, and if -1 the buf is not terminated by ‘\0’.
therefore these should be simply
if(readstr(fd, buf, sizeof buf) < 0)
fatal(1, "cannot read OK in p9any”);
by the way, how can I debug drawterm.
fprint(2,…) is no effect.
Kenji Arisawa
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [9front] a small bug in drawterm
2016-04-13 10:08 a small bug in drawterm arisawa
@ 2016-04-14 23:58 ` cinap_lenrek
0 siblings, 0 replies; 2+ messages in thread
From: cinap_lenrek @ 2016-04-14 23:58 UTC (permalink / raw)
To: 9front
commited, thanks.
just print() should do for debugging.
--
cinap
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-04-14 23:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-13 10:08 a small bug in drawterm arisawa
2016-04-14 23:58 ` [9front] " cinap_lenrek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).