[haiku-commits] r34192 - haiku/trunk/src/apps/diskprobe

  • From: stpere@xxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Mon, 23 Nov 2009 01:52:49 +0100 (CET)

Author: stpere
Date: 2009-11-23 01:52:49 +0100 (Mon, 23 Nov 2009)
New Revision: 34192
Changeset: http://dev.haiku-os.org/changeset/34192/haiku
Ticket: http://dev.haiku-os.org/ticket/1453

Modified:
   haiku/trunk/src/apps/diskprobe/DataView.cpp
Log:
Diskprobe :
in is_valid_utf8() :
 * Accept EOL/LF as part of a valid UTF8 string.
 * This allow a string containing it to be copied to the clipboard.
 * Fixing ticket #1453.


Modified: haiku/trunk/src/apps/diskprobe/DataView.cpp
===================================================================
--- haiku/trunk/src/apps/diskprobe/DataView.cpp 2009-11-23 00:34:44 UTC (rev 
34191)
+++ haiku/trunk/src/apps/diskprobe/DataView.cpp 2009-11-23 00:52:49 UTC (rev 
34192)
@@ -45,7 +45,7 @@
 
                if ((data[i] & 0x80) == 0) {
                        // a single byte character
-                       if (data[i] < ' ' || data[i] == 0x7f)
+                       if (data[i] < ' ' && data[i] != 0x0a || data[i] == 0x7f)
                                return false;
 
                        continue;


Other related posts:

  • » [haiku-commits] r34192 - haiku/trunk/src/apps/diskprobe - stpere