tools/drawMapTest/drawmapscene.cpp
changeset 4457 ffb766e85150
parent 4442 f8424e1bc936
child 4471 220d44cb8659
--- a/tools/drawMapTest/drawmapscene.cpp	Sat Dec 04 11:30:54 2010 -0500
+++ b/tools/drawMapTest/drawmapscene.cpp	Sat Dec 04 22:33:14 2010 +0300
@@ -94,9 +94,9 @@
             qint16 py = qToBigEndian((qint16)point.y());
             quint8 flags = 2;
             if(!cnt) flags |= 0x80;
-            b.append((const char *)&flags, 1);
             b.append((const char *)&px, 2);
             b.append((const char *)&py, 2);
+            b.append((const char *)&flags, 1);
 
             ++cnt;
         }
@@ -115,12 +115,12 @@
 
     while(data.size() >= 5)
     {
-        quint8 flags = *(quint8 *)data.data();
-        data.remove(0, 1);
         qint16 px = qFromBigEndian(*(qint16 *)data.data());
         data.remove(0, 2);
         qint16 py = qFromBigEndian(*(qint16 *)data.data());
         data.remove(0, 2);
+        quint8 flags = *(quint8 *)data.data();
+        data.remove(0, 1);
 
         //last chunk or first point
         if((data.size() < 5) || (flags & 0x80))