Skip to content

Commit

Permalink
Better error message of uvector reader
Browse files Browse the repository at this point in the history
Fix #1095
  • Loading branch information
shirok committed Jan 1, 2025
1 parent 1460767 commit 4d78e44
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/vector.c
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,10 @@ ScmObj Scm_ListToUVector(ScmClass *klass, ScmObj list, int clamp)
NULL);
ScmObj cp = list;
for (ScmSize i=0; i<length; i++, cp = SCM_CDR(cp)) {
if (!SCM_NUMBERP(SCM_CAR(cp))) {
Scm_Error("Bad type of element; number expected, but got: %S",
SCM_CAR(cp));
}
switch (type) {
case SCM_UVECTOR_S8:
SCM_S8VECTOR_ELEMENTS(v)[i] =
Expand Down

0 comments on commit 4d78e44

Please sign in to comment.