diff options
Diffstat (limited to 'mps/code/table.c')
| -rw-r--r-- | mps/code/table.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mps/code/table.c b/mps/code/table.c index e1db04202b3..772e45d9d30 100644 --- a/mps/code/table.c +++ b/mps/code/table.c | |||
| @@ -157,7 +157,7 @@ extern Res TableCreate(Table *tableReturn, size_t length) | |||
| 157 | if(table == NULL) goto failMallocTable; | 157 | if(table == NULL) goto failMallocTable; |
| 158 | if (length < 2) length = 2; | 158 | if (length < 2) length = 2; |
| 159 | /* Table size is length rounded up to the next power of 2. */ | 159 | /* Table size is length rounded up to the next power of 2. */ |
| 160 | table->length = 1 << (sizeFloorLog2(length-1) + 1); | 160 | table->length = (size_t)1 << (sizeFloorLog2(length-1) + 1); |
| 161 | table->count = 0; | 161 | table->count = 0; |
| 162 | table->limit = (size_t)(.5 * length); | 162 | table->limit = (size_t)(.5 * length); |
| 163 | table->array = malloc(sizeof(TableEntryStruct) * length); | 163 | table->array = malloc(sizeof(TableEntryStruct) * length); |