projects
/
u
/
mdw
/
catacomb
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix long-standing stupidity in @mp_dest@.
[u/mdw/catacomb]
/
mp-mem.c
diff --git
a/mp-mem.c
b/mp-mem.c
index
0ce7a20
..
78a72ff
100644
(file)
--- a/
mp-mem.c
+++ b/
mp-mem.c
@@
-1,6
+1,6
@@
/* -*-c-*-
*
/* -*-c-*-
*
- * $Id: mp-mem.c,v 1.
5 2001/06/16 12:57:00
mdw Exp $
+ * $Id: mp-mem.c,v 1.
6 2004/04/03 03:30:22
mdw Exp $
*
* Memory management for multiprecision numbers
*
*
* Memory management for multiprecision numbers
*
@@
-30,6
+30,9
@@
/*----- Revision history --------------------------------------------------*
*
* $Log: mp-mem.c,v $
/*----- Revision history --------------------------------------------------*
*
* $Log: mp-mem.c,v $
+ * Revision 1.6 2004/04/03 03:30:22 mdw
+ * Fix long-standing stupidity in @mp_dest@.
+ *
* Revision 1.5 2001/06/16 12:57:00 mdw
* Implement some missing functions.
*
* Revision 1.5 2001/06/16 12:57:00 mdw
* Implement some missing functions.
*
@@
-288,7
+291,7
@@
mp *mp_dest(mp *m, size_t sz, unsigned f)
/* --- Otherwise check whether the destination is suitable --- */
if (m->ref > 1 || (m->f & MP_CONST) ||
/* --- Otherwise check whether the destination is suitable --- */
if (m->ref > 1 || (m->f & MP_CONST) ||
-
m->sz > len
|| !((f & ~m->f) & MP_BURN)) {
+
sz > m->sz
|| !((f & ~m->f) & MP_BURN)) {
/* --- No -- allocate a new buffer --- *
*
/* --- No -- allocate a new buffer --- *
*