X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=src%2Fobjects.c;h=b957073d941f73c109ecf8b760bdb9d0d8dd0c54;hb=d11f2f726ed7feea617476d99cf7505ddd9a27ce;hp=9d54ec21a30e3537100aa49ffdddc6571fc7556a;hpb=8760c1ba6442153afe76bcac742e086f90c59fe8;p=inform.git diff --git a/src/objects.c b/src/objects.c index 9d54ec2..b957073 100644 --- a/src/objects.c +++ b/src/objects.c @@ -7,7 +7,7 @@ /* specifications for the object-maker. */ /* */ /* Part of Inform 6.35 */ -/* copyright (c) Graham Nelson 1993 - 2020 */ +/* copyright (c) Graham Nelson 1993 - 2021 */ /* */ /* Inform is free software: you can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ @@ -809,7 +809,7 @@ static int write_property_block_z(char *shortname) { uchar *tmp; if (mark+1+510 >= MAX_PROP_TABLE_SIZE) memoryerror("MAX_PROP_TABLE_SIZE",MAX_PROP_TABLE_SIZE); - tmp = translate_text(p+mark+1,p+mark+1+510,shortname); + tmp = translate_text(p+mark+1,p+mark+1+510,shortname,STRCTX_OBJNAME); if (!tmp) error ("Short name of object exceeded 765 Z-characters"); i = subtract_pointers(tmp,(p+mark+1)); p[mark] = i/2; @@ -1002,7 +1002,7 @@ static void manufacture_object_g(void) } objectsg[no_objects].shortname = compile_string(shortname_buffer, - FALSE, FALSE); + STRCTX_OBJNAME); /* The properties table consists simply of a sequence of property blocks, one for each object in order of definition, exactly as @@ -1433,7 +1433,8 @@ the names '%s' and '%s' actually refer to the same property", if (token_type == SEGMENT_MARKER_TT) { put_token_back(); break; } if ((!individual_property) && (property_number==1) - && (token_type != SQ_TT) && (token_type != DQ_TT) + && ((token_type != SQ_TT) || (strlen(token_text) <2 )) + && (token_type != DQ_TT) ) warning ("'name' property should only contain dictionary words"); @@ -1755,7 +1756,6 @@ extern void make_class(char * metaclass_name) { int n, duplicates_to_make = 0, class_number = no_objects+1, metaclass_flag = (metaclass_name != NULL); char duplicate_name[128]; - int class_symbol; debug_location_beginning beginning_debug_location = get_token_location_beginning(); @@ -1846,8 +1846,6 @@ inconvenience, please contact the maintainers."); full_object_g.propdata[0].marker = OBJECT_MV; } - class_symbol = token_value; - if (!metaclass_flag) { get_next_token(); if ((token_type == SEP_TT) && (token_value == OPENB_SEP))