diff options
| -rw-r--r-- | bugs | 17 |
1 files changed, 17 insertions, 0 deletions
| @@ -1476,6 +1476,23 @@ ldebug.c: | |||
| 1476 | } | 1476 | } |
| 1477 | 1477 | ||
| 1478 | Bug{ | 1478 | Bug{ |
| 1479 | what = [[Very small numbers all collide in the hash function. | ||
| 1480 | (This creates only performance problems; the behavoir is correct.)]], | ||
| 1481 | report = [[, on ]], | ||
| 1482 | since = [[Lua 5.0]], | ||
| 1483 | example = [[ ]], | ||
| 1484 | patch = [[ | ||
| 1485 | ltable.c: | ||
| 1486 | 87,88c87,88 | ||
| 1487 | < n += 1; /* normalize number (avoid -0) */ | ||
| 1488 | < lua_assert(sizeof(a) <= sizeof(n)); | ||
| 1489 | --- | ||
| 1490 | > if (luai_numeq(n, 0)) /* avoid problems with -0 */ | ||
| 1491 | > return gnode(t, 0); | ||
| 1492 | ]], | ||
| 1493 | } | ||
| 1494 | |||
| 1495 | Bug{ | ||
| 1479 | what = [[ ]], | 1496 | what = [[ ]], |
| 1480 | report = [[ , on ]], | 1497 | report = [[ , on ]], |
| 1481 | since = [[i ]], | 1498 | since = [[i ]], |
