ViewVC Help
View File | Revision Log | View Changeset | Root Listing
root/Oni2/Daodan/src/Daodan.c
(Generate patch)

Comparing Daodan/src/Daodan.c (file contents):
Revision 677 by alloc, Sat Mar 2 23:46:33 2013 UTC vs.
Revision 681 by alloc, Sun Mar 3 04:37:58 2013 UTC

# Line 555 | Line 555 | FILE *__fastcall DDrPrintWarning(int fil
555          FILE *result; // eax@4
556          char v6[512]; // [sp+0h] [bp-100h]@1
557          FILE* UUgError_WarningFile = *_UUgError_WarningFile;
558        sprintf_s(
559                v6, 512,
560                "Error %x reported from File: %s, Line: %d (message follows) \r\n%s",
561                errornum,
562                filename,
563                linenumber,
564                message);
558  
559 <        if ( UUgError_WarningFile
560 <                || (UUgError_WarningFile = oni_fopen("debugger.txt", "wb"), UUgError_WarningFile ) )
561 <        {
562 <                oni_fprintf(UUgError_WarningFile, "%s\r\n", v6);
563 <                oni_fflush(UUgError_WarningFile);
559 >        if (filename && message && (strlen(filename)+strlen(message))<420) {
560 >                sprintf(
561 >                        v6,
562 >                        "Error %x reported from File: %s, Line: %d (message follows) \r\n%s",
563 >                        errornum,
564 >                        filename,
565 >                        linenumber,
566 >                        message);
567 >
568 >                if ( UUgError_WarningFile
569 >                        || (UUgError_WarningFile = oni_fopen("debugger.txt", "wb"), UUgError_WarningFile ) )
570 >                {
571 >                        oni_fprintf(UUgError_WarningFile, "%s\r\n", v6);
572 >                        oni_fflush(UUgError_WarningFile);
573 >                }
574          }
575          //oni_fprintf(stdout, v6);
576          //sprintf(&v6, "%s", message);

Diff Legend

Removed lines
+ Added lines
< Changed lines (old)
> Changed lines (new)