[haiku-commits] Re: r39930 - haiku/trunk/src/servers/app

Am 24.12.2010 02:13, schrieb mmlr@xxxxxxxx:
Author: mmlr
Date: 2010-12-24 02:13:28 +0100 (Fri, 24 Dec 2010)
New Revision: 39930
Changeset: http://dev.haiku-os.org/changeset/39930

Modified:
    haiku/trunk/src/servers/app/ServerApp.cpp
Log:
* CID 8120: The size supplied to the attach call was the one of the pointer, so
   the data was never correctly attached.

[...]

@@ -2406,8 +2404,11 @@
                                        if (font.GetBoundingBoxes(charArray, 
numBytes,
                                                        rectArray, 
stringEscapement, mode, delta,
                                                        code == 
AS_GET_BOUNDINGBOXES_STRING) == B_OK) {
+
                                                fLink.StartMessage(B_OK);
-                                               fLink.Attach(rectArray, 
sizeof(rectArray));
+                                               for (int32 i = 0; i<  numChars; 
i++)
+                                                       
fLink.Attach<BRect>(rectArray[i]);
+
                                                success = true;
                                        }
                                }

Thanks! This would explain why the bounding boxen in the Font demo did not work anymore. But I am almost 100% sure they did at some time... ah well the svn history knows the offender... :-D

Best regards,
-Stephan

Other related posts: