File tree Expand file tree Collapse file tree 1 file changed +19
-16
lines changed Expand file tree Collapse file tree 1 file changed +19
-16
lines changed Original file line number Diff line number Diff line change @@ -2753,26 +2753,29 @@ fatal_output_debug(const char *msg)
2753
2753
2754
2754
OutputDebugStringW (L"Fatal Python error: " );
2755
2755
2756
- msglen = strlen (msg );
2757
- while (msglen ) {
2758
- size_t i ;
2756
+ if (msg ) {
2757
+ msglen = strlen (msg );
2758
+ while (msglen ) {
2759
+ size_t i ;
2759
2760
2760
- if (buflen > msglen ) {
2761
- buflen = msglen ;
2762
- }
2761
+ if (buflen > msglen ) {
2762
+ buflen = msglen ;
2763
+ }
2763
2764
2764
- /* Convert the message to wchar_t. This uses a simple one-to-one
2765
- conversion, assuming that the this error message actually uses
2766
- ASCII only. If this ceases to be true, we will have to convert. */
2767
- for (i = 0 ; i < buflen ; ++ i ) {
2768
- buffer [i ] = msg [i ];
2769
- }
2770
- buffer [i ] = L'\0' ;
2771
- OutputDebugStringW (buffer );
2765
+ /* Convert the message to wchar_t. This uses a simple one-to-one
2766
+ conversion, assuming that the this error message actually uses
2767
+ ASCII only. If this ceases to be true, we will have to convert. */
2768
+ for (i = 0 ; i < buflen ; ++ i ) {
2769
+ buffer [i ] = msg [i ];
2770
+ }
2771
+ buffer [i ] = L'\0' ;
2772
+ OutputDebugStringW (buffer );
2772
2773
2773
- msg += buflen ;
2774
- msglen -= buflen ;
2774
+ msg += buflen ;
2775
+ msglen -= buflen ;
2776
+ }
2775
2777
}
2778
+
2776
2779
OutputDebugStringW (L"\n" );
2777
2780
}
2778
2781
#endif
You can’t perform that action at this time.
0 commit comments