Skip to content

Commit

Permalink
FIX: code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Oldes committed Mar 12, 2024
1 parent bb6d868 commit 62dd93c
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/core/t-object.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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)))
Expand Down

0 comments on commit 62dd93c

Please sign in to comment.