Permalink
Browse files

. 修正 cat --hex 丢失显示字符问题。(issues #150)

  • Loading branch information...
yaya
yaya committed Jun 18, 2017
1 parent fd6384e commit ed54c034f0efb1eb24b111705799a9421f8d3b06
Showing with 5 additions and 1 deletion.
  1. +3 −0 ChangeLog_chenall.txt
  2. +2 −1 stage2/builtins.c
View
@@ -1,4 +1,7 @@
更新说明:
+2017-06-18(yaya)
+ 修正 cat --hex 丢失显示字符问题.
+
2017-06-11(yaya)
修正 exFAT 每簇字节 >=128Kb 时,启动失败。
View
@@ -1246,7 +1246,8 @@ void hexdump(grub_u64_t ofs,char* buf,int len)
else
{
j = k - i;
- printf("%c",(unsigned long)((((unsigned char)buf[j]>=32) && ((unsigned char)buf[j]!=127))?buf[j]:'.'));
+ char c = (char)((((unsigned char)buf[j]>=32) && ((unsigned char)buf[j]!=127))?buf[j]:'.');
+ putchar(c, 255);
}
}

0 comments on commit ed54c03

Please sign in to comment.