Merge pull request #5 from XJIE6/post-historic

Compiled program segfault bugfix
This commit is contained in:
Dmitry Boulytchev 2019-08-22 00:26:42 +02:00 committed by GitHub
commit 0ca2ae1600
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -316,13 +316,16 @@ extern void* Bsexp (int n, ...) {
extern int Btag (void *d, int t, int n) {
data *r = (data *) BOX (NULL);
r = TO_DATA(d);
if (UNBOXED(d)) return BOX(0);
else {
r = TO_DATA(d);
#ifndef DEBUG_PRINT
return BOX(TAG(r->tag) == SEXP_TAG && TO_SEXP(d)->tag == t && LEN(r->tag) == n);
return BOX(TAG(r->tag) == SEXP_TAG && TO_SEXP(d)->tag == t && LEN(r->tag) == n);
#else
return BOX(TAG(r->tag) == SEXP_TAG &&
return BOX(TAG(r->tag) == SEXP_TAG &&
GET_SEXP_TAG(TO_SEXP(d)->tag) == t && LEN(r->tag) == n);
#endif
}
}
extern int Barray_patt (void *d, int n) {