Commit a1fd7704 authored by topjohnwu's avatar topjohnwu

Fix vector bug

parent b94227ef
...@@ -26,6 +26,6 @@ void vec_deep_destroy(struct vector *v); ...@@ -26,6 +26,6 @@ void vec_deep_destroy(struct vector *v);
#define vec_for_each_r(v, e) \ #define vec_for_each_r(v, e) \
e = (v)->data[(v)->size - 1]; \ e = (v)->data[(v)->size - 1]; \
for (size_t _ = (v)->size - 1; _ >= 0; --_, e = (v)->data[_]) for (size_t _ = (v)->size; _ > 0; --_, e = (v)->data[_ - 1])
#endif #endif
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment