Skip to content

Commit

Permalink
FIX: query multiple values of a datetime value
Browse files Browse the repository at this point in the history
  • Loading branch information
Oldes committed Jul 19, 2024
1 parent 45ac2d3 commit 9907c60
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/core/t-date.c
Original file line number Diff line number Diff line change
Expand Up @@ -1065,6 +1065,7 @@ static const REBI64 DAYS_OF_JAN_1ST_1970 = 719468; // number of days for 1st Jan
REBVAL *out = D_RET;
REBSER *values = Make_Block(2 * BLK_LEN(VAL_SERIES(field)));
REBVAL *word = VAL_BLK_DATA(field);
REBVAL *field;
for (; NOT_END(word); word++) {
if (ANY_WORD(word)) {
if (!IS_GET_WORD(word)) {
Expand All @@ -1075,7 +1076,8 @@ static const REBI64 DAYS_OF_JAN_1ST_1970 = 719468; // number of days for 1st Jan
VAL_SET_LINE(out);
}
out = Append_Value(values);
if (!Query_Date_Field(val, word, out))
SET_TYPE((field = word), REB_WORD);
if (!Query_Date_Field(val, field, out))
Trap1(RE_INVALID_ARG, word);
}
else Trap1(RE_INVALID_ARG, word);
Expand Down

0 comments on commit 9907c60

Please sign in to comment.