chiark
/
gitweb
/
~mdw
/
mLib
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
3929881
)
struct/sym.c: Fix loading following table extension.
author
Mark Wooding
<mdw@distorted.org.uk>
Thu, 18 Jul 2024 15:09:18 +0000
(16:09 +0100)
committer
Mark Wooding
<mdw@distorted.org.uk>
Thu, 18 Jul 2024 15:09:18 +0000
(16:09 +0100)
The calculation should be based on the previous size, because we've
already spent half of the tokens getting to this point.
struct/sym.c
patch
|
blob
|
blame
|
history
diff --git
a/struct/sym.c
b/struct/sym.c
index 25e297af93dde6ffc7fc18164468e637839e300e..4eca8916ef09b91bc88d2a140f80b9f216dc840a 100644
(file)
--- a/
struct/sym.c
+++ b/
struct/sym.c
@@
-179,7
+179,7
@@
void *sym_find(sym_table *t, const char *n, long l, size_t sz, unsigned *f)
if (t->load)
t->load--;
if (!t->load && hash_extend(&t->t))
- t->load = SYM_LIMIT(t->t.mask + 1);
+ t->load = SYM_LIMIT(t->t.mask
/2
+ 1);
/* --- Finished that, so return the new symbol block --- */