Skip to content

Commit

Permalink
FIXED: PL_get_nchars() and friends CVT_INTEGER handling
Browse files Browse the repository at this point in the history
Broken in 2ac1553
  • Loading branch information
JanWielemaker committed Sep 7, 2023
1 parent bcbe9d5 commit c1850ec
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/SWI-Prolog.h
Original file line number Diff line number Diff line change
Expand Up @@ -919,7 +919,7 @@ PL_EXPORT(int) _PL_get_arg(int index, term_t t, term_t a);
#define CVT_WRITE_CANONICAL 0x00000100
#define CVT_WRITEQ 0x00000200
#define CVT_ALL (CVT_ATOMIC|CVT_LIST)
#define CVT_XINTEGER (0x00000400|CVT_INTEGER)
#define CVT_XINTEGER (0x00000400|CVT_INTEGER)
#define CVT_MASK 0x00000fff

#define CVT_EXCEPTION 0x00001000 /* throw exception on error */
Expand Down
2 changes: 1 addition & 1 deletion src/os/pl-text.c
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ PL_get_text(DECL_LD term_t l, PL_chars_t *text, int flags)
} else if ( ((flags&CVT_RATIONAL) && isRational(w)) ||
((flags&CVT_INTEGER) && isInteger(w)) )
{ number n;
int base = (flags&CVT_XINTEGER) ? 16 : 10;
int base = (flags&CVT_XINTEGER)==CVT_XINTEGER ? 16 : 10;

PL_get_number(l, &n);
switch(n.type)
Expand Down

0 comments on commit c1850ec

Please sign in to comment.