From aa6148adbdb828718da3cd037b807b200429b067 Mon Sep 17 00:00:00 2001 From: Jemma Issroff Date: Wed, 7 Jun 2023 13:08:48 -0400 Subject: [PATCH] Add default location to parameters node This is currently breaking on 32 bit machines because in the case where we only have errors in the parameters, we never set the location, and then have underflow if the file is sufficiently large --- src/yarp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/yarp.c b/src/yarp.c index ba79f909bab..57c6ef237ae 100644 --- a/src/yarp.c +++ b/src/yarp.c @@ -2458,7 +2458,7 @@ yp_parameters_node_create(yp_parser_t *parser) { *node = (yp_parameters_node_t) { { .type = YP_NODE_PARAMETERS_NODE, - .location = { .start = NULL, .end = NULL }, + .location = { .start = parser->current.start, .end = parser->current.start }, }, .rest = NULL, .keyword_rest = NULL,