Comments (4)
Suggestion:
998 extern void assemblez_instruction(const assembly_instruction *AI)
999 {
1000 int32 operands_pc;
1001 int32 start_pc;
1002 int32 offset, j, topbits=0, types_byte1, types_byte2;
1003 int operand_rules, min=0, max=0, no_operands_given, at_seq_point = FALSE;
1004 assembly_operand o1, o2;
1005 opcodez opco;
+ char text_temp[35];
1006
1007 ASSERT_ZCODE();
...
1081 if (operand_rules==TEXT)
1082 { int32 i;
+ for (i = 0; i < 35; i++) text_temp[i] = AI->text[i]; //Copy uncorrupted text
1083 j = translate_text(-1, AI->text, STRCTX_GAMEOPC);
1084 if (j < 0) {
1085 error("text translation failed");
1086 j = 0;
1087 }
...
1199 Instruction_Done:
1200
1201 if (asm_trace_level > 0)
1202 { int i;
1203 printf("%5d +%05lx %3s %-12s ", ErrorReport.line_number,
1204 ((long int) offset),
1205 (at_seq_point)?"<*>":" ", opco.name);
1206
1207 if ((AI->internal_number == print_zc)
1208 || (AI->internal_number == print_ret_zc))
1209 { printf("\"");
1210 - for (i=0;(AI->text)[i]!=0 && i<35; i++) printf("%c",(AI->text)[i]);
1210 + for (i=0;(AI->text)[i]!=0 && i<35; i++) printf("%c",text_temp[i]);
1211 if (i == 35) printf("...");
1212 printf("\"");
1213 }
from inform6.
Since this is for tracing, I think it's better to print an abbreviation marker. (I've tried hard to get rid of all the fixed-length string buffers!)
from inform6.
That explains why I had a hard time finding any internal example for a short temp string...
The actual text isn't especially important so an abbreviation marker is perfectly fine.
from inform6.
Fixed in #293 .
from inform6.
Related Issues (20)
- Feature: singular flag for dict words HOT 2
- Dict flags fail when DICT_WORD_SIZE=31 and DICT_CHAR_SIZE=4
- Feature: Overflow flag for dict words HOT 2
- Add `$GRAMMAR_VERSION` compiler setting HOT 1
- Add `$OMIT_PAGE_PADDING` compiler setting HOT 1
- Add `$IGNORE_INLINE_COMPILER_SETTINGS` compiler setting HOT 2
- Impossible to use custom alphabet for 4 first objects HOT 2
- Grammar version 3 HOT 2
- Meta flag for grammar/action lines HOT 5
- Command-line options should override !% headers HOT 2
- Verb declarations can clash if the verbs encode to the same dict word HOT 6
- Accept two Verb declarations for the same verb, with a warning
- Debug output for system constants is out of date
- How to build lib 6.11 with current inform6 master HOT 5
- Empty statement "can never be reached" HOT 3
- Allow redundant verbs in a single Verb directive HOT 1
- Error in $GRAMMAR_META_FLAG documentation HOT 1
- The recording of unicode text (gametext.txt) is altered if an accent is present in a dictionary word HOT 4
- Cleanup: dict word printing
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from inform6.