mirror of
https://github.com/urbit/shrub.git
synced 2024-12-14 11:08:45 +03:00
Handle trailing newline in keyfile.
This commit is contained in:
parent
e8416596fb
commit
017cb4cb15
16
vere/sist.c
16
vere/sist.c
@ -1359,6 +1359,22 @@ u3_sist_boot(void)
|
||||
|
||||
if ( 0 != u3_Host.ops_u.key_c ) {
|
||||
u3_noun des = u3m_file(u3_Host.ops_u.key_c);
|
||||
|
||||
// handle trailing newline
|
||||
//
|
||||
{
|
||||
c3_c* key_c = u3r_string(des);
|
||||
c3_w len_w = strlen(key_c);
|
||||
|
||||
if (len_w && (key_c[len_w - 1] == '\n')) {
|
||||
key_c[len_w - 1] = '\0';
|
||||
u3z(des);
|
||||
des = u3i_string(key_c);
|
||||
}
|
||||
|
||||
free(key_c);
|
||||
}
|
||||
|
||||
sed = sist_key(des);
|
||||
}
|
||||
else if ( 0 != u3_Host.ops_u.gen_c ) {
|
||||
|
Loading…
Reference in New Issue
Block a user