comparison src/alloc.c @ 51779:f01acdb936f9

(live_float_p): Check that p is not past the `floats' array, now that `floats' is not the last element of the struct any more.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Sun, 06 Jul 2003 23:12:21 +0000
parents ad47aa3ee2d7
children 43d663a05e2d
comparison
equal deleted inserted replaced
51778:2d00a74e78bc 51779:f01acdb936f9
3466 int offset = (char *) p - (char *) &b->floats[0]; 3466 int offset = (char *) p - (char *) &b->floats[0];
3467 3467
3468 /* P must point to the start of a Lisp_Float and not be 3468 /* P must point to the start of a Lisp_Float and not be
3469 one of the unused cells in the current float block. */ 3469 one of the unused cells in the current float block. */
3470 return (offset >= 0 3470 return (offset >= 0
3471 && offset < (FLOAT_BLOCK_SIZE * sizeof b->floats[0])
3471 && offset % sizeof b->floats[0] == 0 3472 && offset % sizeof b->floats[0] == 0
3472 && (b != float_block 3473 && (b != float_block
3473 || offset / sizeof b->floats[0] < float_block_index)); 3474 || offset / sizeof b->floats[0] < float_block_index));
3474 } 3475 }
3475 else 3476 else