mirror of
https://github.com/ProgramSnail/Lama.git
synced 2025-12-06 14:58:50 +00:00
Compiled program segfault bugfix
This commit is contained in:
parent
a24866cc6f
commit
99f6357ccd
1 changed files with 6 additions and 3 deletions
|
|
@ -316,6 +316,8 @@ extern void* Bsexp (int n, ...) {
|
||||||
|
|
||||||
extern int Btag (void *d, int t, int n) {
|
extern int Btag (void *d, int t, int n) {
|
||||||
data *r = (data *) BOX (NULL);
|
data *r = (data *) BOX (NULL);
|
||||||
|
if (UNBOXED(d)) return BOX(0);
|
||||||
|
else {
|
||||||
r = TO_DATA(d);
|
r = TO_DATA(d);
|
||||||
#ifndef DEBUG_PRINT
|
#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);
|
||||||
|
|
@ -323,6 +325,7 @@ extern int Btag (void *d, int t, int n) {
|
||||||
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);
|
GET_SEXP_TAG(TO_SEXP(d)->tag) == t && LEN(r->tag) == n);
|
||||||
#endif
|
#endif
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
extern int Barray_patt (void *d, int n) {
|
extern int Barray_patt (void *d, int n) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue