[Spice-devel] [spice-html5] Tweak hexdump to not generate new lines.

Jeremy White jwhite at codeweavers.com
Tue May 20 11:03:05 PDT 2014


Signed-off-by: Jeremy White <jwhite at codeweavers.com>
---
 utils.js |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/utils.js b/utils.js
index 167f184..9eb42ff 100644
--- a/utils.js
+++ b/utils.js
@@ -63,7 +63,10 @@ function hexdump_buffer(a)
             hex += "0";
         hex += h + " ";
 
-        str += String.fromCharCode(mg[i]);
+        if (mg[i] == 10 || mg[i] == 13 || mg[i] == 8)
+            str += ".";
+        else
+            str += String.fromCharCode(mg[i]);
 
         if ((i % 16 == 15) || (i == (mg.length - 1)))
         {
-- 
1.7.10.4



More information about the Spice-devel mailing list