diff options
Diffstat (limited to 'appl/lib/convcs')
| -rw-r--r-- | appl/lib/convcs/convcs.b | 2 | ||||
| -rw-r--r-- | appl/lib/convcs/utf8_btos.b | 9 |
2 files changed, 5 insertions, 6 deletions
diff --git a/appl/lib/convcs/convcs.b b/appl/lib/convcs/convcs.b index 23208224..8e3b31f3 100644 --- a/appl/lib/convcs/convcs.b +++ b/appl/lib/convcs/convcs.b @@ -142,7 +142,7 @@ aliases(cs : string) : (string, list of string) recs := cfg->lookup(name); if (recs == nil) continue; # shouldn't happen! - (val, rec) := hd recs; + (val, nil) := hd recs; if (val != cs) continue; al = name :: al; diff --git a/appl/lib/convcs/utf8_btos.b b/appl/lib/convcs/utf8_btos.b index 7ed10ddd..307ef863 100644 --- a/appl/lib/convcs/utf8_btos.b +++ b/appl/lib/convcs/utf8_btos.b @@ -23,12 +23,11 @@ btos(nil : Convcs->State, b : array of byte, n : int) : (Convcs->State, string, str = string b[:nbytes]; } else { for (; nbytes < len b && len str < n;) { - (ch, l, s) := sys->byte2char(b, nbytes); - if (l > 0) { - str[len str] = ch; - nbytes += l; - } else + (ch, l, nil) := sys->byte2char(b, nbytes); + if (l <= 0) break; + str[len str] = ch; + nbytes += l; } } return (nil, str, nbytes); |
