git: a61bbc3023c5 - main - cad/nvc: fix off by one for powerpc*

From: Piotr Kubaj <pkubaj_at_FreeBSD.org>
Date: Wed, 10 Aug 2022 21:54:04 UTC
The branch main has been updated by pkubaj:

URL: https://cgit.FreeBSD.org/ports/commit/?id=a61bbc3023c57716d097bccbf93ba8c87872909a

commit a61bbc3023c57716d097bccbf93ba8c87872909a
Author:     Piotr Kubaj <pkubaj@FreeBSD.org>
AuthorDate: 2022-08-10 21:40:22 +0000
Commit:     Piotr Kubaj <pkubaj@FreeBSD.org>
CommitDate: 2022-08-10 21:40:22 +0000

    cad/nvc: fix off by one for powerpc*
    
    There are actually 32 GPR for POWER.
---
 cad/nvc/files/patch-thirdparty_cpustate.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cad/nvc/files/patch-thirdparty_cpustate.c b/cad/nvc/files/patch-thirdparty_cpustate.c
index 074770c7d712..f78ac6e70192 100644
--- a/cad/nvc/files/patch-thirdparty_cpustate.c
+++ b/cad/nvc/files/patch-thirdparty_cpustate.c
@@ -9,7 +9,7 @@
 +   cpu->pc = uc->uc_mcontext.mc_srr0;
 +   cpu->sp = uc->uc_mcontext.mc_gpr[1];
 +
-+   for (int i = 0; i < 31; i++)
++   for (int i = 0; i < 32; i++)
 +      cpu->regs[i] = uc->uc_mcontext.mc_gpr[i];
  #elif defined __OpenBSD__ && defined __x86_64__
     cpu->pc = uc->sc_rip;