mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 10:12:06 +00:00
Use vec.data() instead of &vec[0]
In general `vec.data()` is always safe, whereas `&vec[0]` may fail when `vec` is empty.
This commit is contained in:
@@ -82,7 +82,7 @@ static int32_t computeRPNExpr(struct Patch const *patch,
|
||||
// Small shortcut to avoid a lot of repetition
|
||||
#define popRPN() popRPN(patch->src, patch->lineNo)
|
||||
|
||||
uint8_t const *expression = &patch->rpnExpression[0];
|
||||
uint8_t const *expression = patch->rpnExpression.data();
|
||||
int32_t size = (int32_t)patch->rpnExpression.size();
|
||||
|
||||
rpnStack.clear();
|
||||
|
||||
Reference in New Issue
Block a user