mirror of
https://github.com/9fans/plan9port.git
synced 2025-01-24 11:41:58 +00:00
freq: fix crash with utf > 0xffff (thanks Andrey Mirtchovski)
R=rsc https://codereview.appspot.com/7029054
This commit is contained in:
parent
0798d6b741
commit
23efb34d47
1 changed files with 2 additions and 2 deletions
|
@ -2,7 +2,7 @@
|
||||||
#include <libc.h>
|
#include <libc.h>
|
||||||
#include <bio.h>
|
#include <bio.h>
|
||||||
|
|
||||||
long count[1<<16];
|
uvlong count[Runemax+1];
|
||||||
Biobuf bout;
|
Biobuf bout;
|
||||||
|
|
||||||
void freq(int, char*);
|
void freq(int, char*);
|
||||||
|
@ -105,7 +105,7 @@ freq(int f, char *s)
|
||||||
else
|
else
|
||||||
Bprint(&bout, "%C ", (int)i);
|
Bprint(&bout, "%C ", (int)i);
|
||||||
}
|
}
|
||||||
Bprint(&bout, "%8ld\n", count[i]);
|
Bprint(&bout, "%8llud\n", count[i]);
|
||||||
}
|
}
|
||||||
Bflush(&bout);
|
Bflush(&bout);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue