Permalink
Browse files

. cat --hex 函数的文本字符,仅显示0x20-0x7e字符。(issues #150)

  • Loading branch information...
yaya
yaya committed Jun 21, 2017
1 parent ed54c03 commit fb49438fa7cb5d24082f703cbbe794e49b99ba30
Showing with 4 additions and 2 deletions.
  1. +3 −0 ChangeLog_chenall.txt
  2. +1 −2 stage2/builtins.c
View
@@ -1,4 +1,7 @@
更新说明:
2017-06-21(yaya)
cat --hex 函数的文本字符,仅显示0x20-0x7e字符。(issues #150)
2017-06-18(yaya)
修正 cat --hex 丢失显示字符问题.
View
@@ -1246,8 +1246,7 @@ void hexdump(grub_u64_t ofs,char* buf,int len)
else
{
j = k - i;
char c = (char)((((unsigned char)buf[j]>=32) && ((unsigned char)buf[j]!=127))?buf[j]:'.');
putchar(c, 255);
putchar((((unsigned char)buf[j]>=32) && ((unsigned char)buf[j]<0x7f))?buf[j]:'.', 255);
}
}

0 comments on commit fb49438

Please sign in to comment.