From 62dd93c4415112cdf9ae5a6f57fa48daadcb4689 Mon Sep 17 00:00:00 2001 From: Oldes Huhuman Date: Tue, 12 Mar 2024 11:38:35 +0100 Subject: [PATCH] FIX: code cleanup --- src/core/t-object.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/core/t-object.c b/src/core/t-object.c index 4535db3820..6497d1a49e 100644 --- a/src/core/t-object.c +++ b/src/core/t-object.c @@ -269,7 +269,7 @@ static REBSER *Trim_Object(REBSER *obj) /* ***********************************************************************/ { - REBINT n = 0; + REBCNT n = 0; if (!VAL_OBJ_FRAME(pvs->value)) { return PE_NONE; // Error objects may not have a frame. @@ -278,12 +278,7 @@ static REBSER *Trim_Object(REBSER *obj) if (IS_WORD(pvs->select)) { n = Find_Word_Index(VAL_OBJ_FRAME(pvs->value), VAL_WORD_SYM(pvs->select), FALSE); } -// else if (IS_INTEGER(pvs->select)) { -// n = Int32s(pvs->select, 1); -// } - else return PE_BAD_SELECT; - - if (n <= 0 || (REBCNT)n >= SERIES_TAIL(VAL_OBJ_FRAME(pvs->value))) + if (n == 0) return PE_BAD_SELECT; if (pvs->setval && IS_END(pvs->path+1) && VAL_PROTECTED(VAL_FRM_WORD(pvs->value, n)))