diff --git a/day5/p1.c b/day5/p1.c index 1c587fa..cf788ba 100644 --- a/day5/p1.c +++ b/day5/p1.c @@ -51,12 +51,11 @@ int main(int argc, char **argv) { uint64_t dst = 0, src = 0, rng = 0; sscanf(line, "%lu %lu %lu\n", &dst, &src, &rng); - for (size_t i = 0; i < data_len; ++i) { + for (size_t i = 0; i < data_len; ++i) if (!data_v[i] && data[i] >= src && data[i] < src+rng) { data[i] = dst + (data[i] - src); data_v[i] = true; } - } memset(line, 0, line_buf_length); }