[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-gnubg] Re: 64 bit gnubg fixes [patch]
From: |
Alex Romosan |
Subject: |
[Bug-gnubg] Re: 64 bit gnubg fixes [patch] |
Date: |
Tue, 25 Apr 2006 10:46:45 -0700 |
User-agent: |
Gnus/5.110004 (No Gnus v0.4) Emacs/21.4 (gnu/linux) |
Alex Romosan <address@hidden> writes:
> the attached patch lets me run gnubg on my amd64 linux machine. i hope
> i didn't change the logic in renderprefs.c (the present code is wrong
> on a 64bit machine as it uses integers and pointers to char
> interchangeably, but on a 64 bit machine the two have different
> sizes). the other changes should be correct.
i slight correction, this is the patch that should be applied to
board3d/misc.c:
Index: board3d/misc3d.c
===================================================================
RCS file: /cvsroot/gnubg/gnubg/board3d/misc3d.c,v
retrieving revision 1.51
diff -u -r1.51 misc3d.c
--- board3d/misc3d.c 12 Apr 2006 06:53:35 -0000 1.51
+++ board3d/misc3d.c 25 Apr 2006 17:44:40 -0000
@@ -831,10 +831,10 @@
float ***Alloc3d(int x, int y, int z)
{ /* Allocate 3d array */
int i, j;
- float ***array = (float ***)malloc(sizeof(float) * x);
+ float ***array = (float ***)malloc(sizeof(float*) * x);
for (i = 0; i < x; i++)
{
- array[i] = (float **)malloc(sizeof(float) * y);
+ array[i] = (float **)malloc(sizeof(float*) * y);
for (j = 0; j < y; j++)
array[i][j] = (float *)malloc(sizeof(float) * z);
}
--alex--
--
| I believe the moment is at hand when, by a paranoiac and active |
| advance of the mind, it will be possible (simultaneously with |
| automatism and other passive states) to systematize confusion |
| and thus to help to discredit completely the world of reality. |