I cant seem to bend extra_descr to my will. Anyone see
what could be causing it to crash on this?
sprintf( extra_buf, "This item bears the seal of %s, the %s smith.",
ch->name,
ch->pcdata->learned[gsn_forge] <= 50 ? "apprentice" :
ch->pcdata->learned[gsn_forge] <= 75 ? "journeyman" :
ch->pcdata->learned[gsn_forge] == 100 ? "master" : "reknowned" );
item->name = STRALLOC( name_buf );
item->short_descr = STRALLOC( short_buf );
item->description = STRALLOC( long_buf );
get_extra_descr( STRALLOC( extra_buf ), item->first_extradesc);
if(VLD_STR(item->first_extradesc->keyword))
item->first_extradesc->keyword = STRALLOC(item->name);
item->last_extradesc = NULL;
#0 0x080d06cb in do_forge (ch=0x939bf08,
argument=0x8427f20 "X «\b\210&¦\b¨Ý¼\b0Î4\t\20025\t\030HJ\t ¶:\t\210¶:\t@®C\tð¸3\tØÛ*\t\020±C\tø©2\t(±C\t\220oM\tp.N\t\020¶2\t\210ã7\tÐ,N\tð¤C\t è7\t°oM\tpB@\tð\0202\tH.N\t¸\2327\t\200¯C\t\220¬@\tP\b5\tà@S\t\030^3\t\210½C\t\030ª2\t\230úL\tàµ2\t\210RD\t\230¦C\tÀùC\tHy+\tHÃ9\t\020AS\t") at crafts.c:722
722 if(VLD_STR(item->first_extradesc->keyword))
(gdb) print argument
$1 = 0x8427f20 "X «\b\210&¦\b¨Ý¼\b0Î4\t\20025\t\030HJ\t ¶:\t\210¶:\t@®C\tð¸3\tØÛ*\t\020±C\tø©2\t(±C\t\220oM\tp.N\t\020¶2\t\210ã7\tÐ,N\tð¤C\t è7\t°oM\tpB@\tð\0202\tH.N\t¸\2327\t\200¯C\t\220¬@\tP\b5\tà@S\t\030^3\t\210½C\t\030ª2\t\230úL\tàµ2\t\210RD\t\230¦C\tÀùC\tHy+\tHÃ9\t\020AS\t"
Current language: auto; currently c++
(gdb) print keyword
No symbol "keyword" in current context.
(gdb) print first_extradesc->keyword
No symbol "first_extradesc" in current context.
(gdb) print item->first_extradesc->keyword
Cannot access memory at address 0x8
what could be causing it to crash on this?
sprintf( extra_buf, "This item bears the seal of %s, the %s smith.",
ch->name,
ch->pcdata->learned[gsn_forge] <= 50 ? "apprentice" :
ch->pcdata->learned[gsn_forge] <= 75 ? "journeyman" :
ch->pcdata->learned[gsn_forge] == 100 ? "master" : "reknowned" );
item->name = STRALLOC( name_buf );
item->short_descr = STRALLOC( short_buf );
item->description = STRALLOC( long_buf );
get_extra_descr( STRALLOC( extra_buf ), item->first_extradesc);
if(VLD_STR(item->first_extradesc->keyword))
item->first_extradesc->keyword = STRALLOC(item->name);
item->last_extradesc = NULL;
#0 0x080d06cb in do_forge (ch=0x939bf08,
argument=0x8427f20 "X «\b\210&¦\b¨Ý¼\b0Î4\t\20025\t\030HJ\t ¶:\t\210¶:\t@®C\tð¸3\tØÛ*\t\020±C\tø©2\t(±C\t\220oM\tp.N\t\020¶2\t\210ã7\tÐ,N\tð¤C\t è7\t°oM\tpB@\tð\0202\tH.N\t¸\2327\t\200¯C\t\220¬@\tP\b5\tà@S\t\030^3\t\210½C\t\030ª2\t\230úL\tàµ2\t\210RD\t\230¦C\tÀùC\tHy+\tHÃ9\t\020AS\t") at crafts.c:722
722 if(VLD_STR(item->first_extradesc->keyword))
(gdb) print argument
$1 = 0x8427f20 "X «\b\210&¦\b¨Ý¼\b0Î4\t\20025\t\030HJ\t ¶:\t\210¶:\t@®C\tð¸3\tØÛ*\t\020±C\tø©2\t(±C\t\220oM\tp.N\t\020¶2\t\210ã7\tÐ,N\tð¤C\t è7\t°oM\tpB@\tð\0202\tH.N\t¸\2327\t\200¯C\t\220¬@\tP\b5\tà@S\t\030^3\t\210½C\t\030ª2\t\230úL\tàµ2\t\210RD\t\230¦C\tÀùC\tHy+\tHÃ9\t\020AS\t"
Current language: auto; currently c++
(gdb) print keyword
No symbol "keyword" in current context.
(gdb) print first_extradesc->keyword
No symbol "first_extradesc" in current context.
(gdb) print item->first_extradesc->keyword
Cannot access memory at address 0x8