GithubHelp home page GithubHelp logo

Comments (4)

heasm66 avatar heasm66 commented on August 23, 2024

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.

erkyrath avatar erkyrath commented on August 23, 2024

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.

heasm66 avatar heasm66 commented on August 23, 2024

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.

erkyrath avatar erkyrath commented on August 23, 2024

Fixed in #293 .

from inform6.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.