Skip to content
This repository has been archived by the owner on May 4, 2018. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
Win: utf-8 decoder bug when compiling with gcc
  • Loading branch information
piscisaureus committed Dec 1, 2011
1 parent 2a6a4a0 commit 9c064fb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/win/tty.c
Expand Up @@ -1258,7 +1258,8 @@ static int uv_tty_write_bufs(uv_tty_t* handle, uv_buf_t bufs[], int bufcnt,
#ifdef _MSC_VER /* msvc */
if (_BitScanReverse(&first_zero_bit, not_c)) {
#else /* assume gcc */
if (first_zero_bit = __builtin_clzl(not_c), c != 0) {
if (c != 0) {
first_zero_bit = (sizeof(int) * 8) - 1 - __builtin_clz(not_c);
#endif
if (first_zero_bit == 7) {
/* Ascii - pass right through */
Expand Down

0 comments on commit 9c064fb

Please sign in to comment.