[haiku-commits] r38890 - haiku/trunk/src/tools

  • From: philippe.houdoin@xxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Tue, 5 Oct 2010 12:14:38 +0200 (CEST)

Author: phoudoin
Date: 2010-10-05 12:14:38 +0200 (Tue, 05 Oct 2010)
New Revision: 38890
Changeset: http://dev.haiku-os.org/changeset/38890
Ticket: http://dev.haiku-os.org/ticket/6255

Modified:
   haiku/trunk/src/tools/generate_boot_screen.cpp
Log:
When a literal sequence was following a 127 long run sequence, as found in 
splash_logo-development.png at 75x65,
the first literal value was skipped, breaking the RLE stream.
Fix #6255.


Modified: haiku/trunk/src/tools/generate_boot_screen.cpp
===================================================================
--- haiku/trunk/src/tools/generate_boot_screen.cpp      2010-10-05 07:25:08 UTC 
(rev 38889)
+++ haiku/trunk/src/tools/generate_boot_screen.cpp      2010-10-05 10:14:38 UTC 
(rev 38890)
@@ -201,19 +201,18 @@
                                                        }
                                                        buffer[0] = 0;
                                                }
-                                               buffer[0]++;
-                                               buffer[buffer[0]] = row[x];
-                                       } else if (count > 0) {
-                                               buffer[0] = 1;
-                                               buffer[1] = row[x];
-                                               bufferActive = true;
-                                               if (count > 1) {
+                                       } else {
+                                               if (count > 0) {
                                                        fprintf(sOutput, "%d, 
", count);
                                                        new_line_if_required();
                                                        fprintf(sOutput, "%d, 
", currentValue);
                                                        new_line_if_required();
                                                }
+                                               buffer[0] = 0;
+                                               bufferActive = true;
                                        }
+                                       buffer[0]++;
+                                       buffer[buffer[0]] = row[x];
                                        currentValue = row[x];
                                }
                        }
@@ -304,19 +303,18 @@
                                                }
                                                buffer[0] = 0;
                                        }
-                                       buffer[0]++;
-                                       buffer[buffer[0]] = row[x];
-                               } else if (count > 0) {
-                                       buffer[0] = 1;
-                                       buffer[1] = row[x];
-                                       bufferActive = true;
-                                       if (count > 1) {
+                               } else {
+                                       if (count > 0) {
                                                fprintf(sOutput, "%d, ", count);
                                                new_line_if_required();
                                                fprintf(sOutput, "%d, ", 
currentValue);
                                                new_line_if_required();
                                        }
+                                       buffer[0] = 0;
+                                       bufferActive = true;
                                }
+                               buffer[0]++;
+                               buffer[buffer[0]] = row[x];
                                currentValue = row[x];
                        }
                }


Other related posts:

  • » [haiku-commits] r38890 - haiku/trunk/src/tools - philippe . houdoin