Browse Source

Bugfix sdl_error

Yann Weber 5 years ago
parent
commit
06de6e8da5
1 changed files with 4 additions and 2 deletions
  1. 4
    2
      yaglitch.asm

+ 4
- 2
yaglitch.asm View File

@@ -501,6 +501,7 @@ visu:
501 501
 sdl_error:
502 502
 	; display error & exit
503 503
 	call SDL_GetError
504
+	mov r13, rax
504 505
 	push rax
505 506
 .dbg:
506 507
 	test rax, rax
@@ -508,10 +509,11 @@ sdl_error:
508 509
 	mov rdi, rax
509 510
 	call strlen
510 511
 	.printerr:
511
-	mov rdx, rsi ; msglen
512
-	pop rdi ; msg
512
+	mov rdx, rax ; msglen
513
+	pop rsi ; msg
513 514
 	mov rax, 1 ; write
514 515
 	mov rdi, 2 ; stderr
516
+.dbg1:
515 517
 	syscall
516 518
 	mov rdi, 0xF
517 519
 	jmp sdl_exit_err

Loading…
Cancel
Save