kassonlab / covid19-epi

Individual-based epidemiological modeling for COVID-19
GNU Lesser General Public License v2.1
5 stars 5 forks source link

Dead code or loop missing #15

Closed RogerJL closed 4 years ago

RogerJL commented 4 years ago

https://github.com/kassonlab/covid19-epi/blob/7c288c213887d2247265e5480fafe844dbe0558c/covid19.c#L2174

Usually 'i' loops over population, here the loop is missing => 'i' reuses old value most likely from last loop, i.e i=population This is likely to result in an access out of range 0..population-1

peterkasson commented 4 years ago

Thanks--issue accepted. We'll take a look.

peterkasson commented 4 years ago

PS both apply: this code is currently unused, but there is a loop missing. Arguably, dead code should be removed, but in the meantime we will fix.

peterkasson commented 4 years ago

Fixed for us; marking closed. Again, if you find an issue with the fix, please comment, and we'll reopen.