On Jun 17, 2011, at 10:52 AM CDT, Stephanie Stroka wrote:

> Am 17.06.2011 17:49, schrieb Tom Hughes:
>> On 17/06/11 16:45, Stephanie Stroka wrote:
>> 
>>> My code at that position looks like this:
>>> 
>>> 284 static uint* sort(uint** matrix, uint width, uint height) {
>>> 285     uint* data = (uint*) malloc(width * height * sizeof(uint));
>>> 286     uint i,j=0;
>>> 287     for(i=0; i<height; i++) {
>>> 288         for(j=0; j<width; j++) {
>>> 289             data[j + i*height] = matrix[i][j];

Maybe you want "data[j + i*width]" instead?

-Dave


------------------------------------------------------------------------------
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
_______________________________________________
Valgrind-users mailing list
Valgrind-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/valgrind-users

Reply via email to