View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0004990 | AI | AI | public | 2015-11-06 13:29 | 2015-11-08 13:55 |
| Reporter | lamer | Assigned To | abma | ||
| Priority | normal | Severity | crash | Reproducibility | random |
| Status | resolved | Resolution | fixed | ||
| Summary | 0004990: [KAIK] Possible memory corruption | ||||
| Description | I assume MicroPather has wrong boundary test and thus leads to memory corruption or endless loops. | ||||
| Steps To Reproduce | Spawn KAIK's units at the map edge. Hope for the best. | ||||
| Additional Information | https://github.com/spring/KAIK/blob/3e99fa1360d8e0e9a1c8a125a5c655daa77aa5ee/MicroPather.cpp#L330 https://github.com/spring/KAIK/blob/3e99fa1360d8e0e9a1c8a125a5c655daa77aa5ee/MicroPather.cpp#L370 Those 2 places should look like: if (x == 0) x = 1; else if (x == mapSizeX - 1) x = mapSizeX - 2; if (y == 0) y = 1; else if (y == mapSizeY - 1) y = mapSizeY - 2; Or even use (x<=0) ... (x>=mapSizeX-1) ? | ||||
| Tags | No tags attached. | ||||