X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=pr_execprogram.h;h=e8886c53c12c918f0b086d225b6178a2a4d8ee07;hb=40453f3c58be439a5bafff7b1916b93aa049a986;hp=f70f100ebeefad3cacc61e0b5fc7771765d19658;hpb=0960c1f25d397c09f680454759f4ea747975c8c9;p=xonotic%2Fdarkplaces.git diff --git a/pr_execprogram.h b/pr_execprogram.h index f70f100e..e8886c53 100644 --- a/pr_execprogram.h +++ b/pr_execprogram.h @@ -154,11 +154,11 @@ pr_xfunction->profile += profile - startprofile; startprofile = profile; pr_xstatement = st - pr_statements; - Host_Error("Progs attempted to write to an out of bounds edict (%i)\n", OPB->_int); + Host_Error("Progs attempted to write to an out of bounds edict (%i)", OPB->_int); return; } #endif - ptr = (prvm_eval_t *)((qbyte *)prog->edictsfields + OPB->_int); + ptr = (prvm_eval_t *)((unsigned char *)prog->edictsfields + OPB->_int); ptr->_int = OPA->_int; break; case OP_STOREP_V: @@ -168,11 +168,11 @@ pr_xfunction->profile += profile - startprofile; startprofile = profile; pr_xstatement = st - pr_statements; - Host_Error("Progs attempted to write to an out of bounds edict (%i)\n", OPB->_int); + Host_Error("Progs attempted to write to an out of bounds edict (%i)", OPB->_int); return; } #endif - ptr = (prvm_eval_t *)((qbyte *)prog->edictsfields + OPB->_int); + ptr = (prvm_eval_t *)((unsigned char *)prog->edictsfields + OPB->_int); ptr->vector[0] = OPA->vector[0]; ptr->vector[1] = OPA->vector[1]; ptr->vector[2] = OPA->vector[2]; @@ -185,7 +185,7 @@ pr_xfunction->profile += profile - startprofile; startprofile = profile; pr_xstatement = st - pr_statements; - Host_Error("Progs attempted to address an invalid field (%i) in an edict\n", OPB->_int); + Host_Error("Progs attempted to address an invalid field (%i) in an edict", OPB->_int); return; } #endif @@ -198,7 +198,7 @@ return; } ed = PRVM_PROG_TO_EDICT(OPA->edict); - OPC->_int = (qbyte *)((int *)ed->v + OPB->_int) - (qbyte *)prog->edictsfields; + OPC->_int = (unsigned char *)((int *)ed->v + OPB->_int) - (unsigned char *)prog->edictsfields; break; case OP_LOAD_F: @@ -212,7 +212,7 @@ pr_xfunction->profile += profile - startprofile; startprofile = profile; pr_xstatement = st - pr_statements; - Host_Error("Progs attempted to read an invalid field in an edict (%i)\n", OPB->_int); + Host_Error("Progs attempted to read an invalid field in an edict (%i)", OPB->_int); return; } #endif @@ -227,7 +227,7 @@ pr_xfunction->profile += profile - startprofile; startprofile = profile; pr_xstatement = st - pr_statements; - Host_Error("Progs attempted to read an invalid field in an edict (%i)\n", OPB->_int); + Host_Error("Progs attempted to read an invalid field in an edict (%i)", OPB->_int); return; } #endif @@ -477,11 +477,11 @@ pr_xfunction->profile += profile - startprofile; startprofile = profile; pr_xstatement = st - pr_statements; - Host_Error("Progs attempted to write to an out of bounds edict\n"); + Host_Error("Progs attempted to write to an out of bounds edict"); return; } #endif - ptr = (prvm_eval_t *)((qbyte *)prog->edictsfields + OPB->_int); + ptr = (prvm_eval_t *)((unsigned char *)prog->edictsfields + OPB->_int); ptr->_int = OPA->_int; break; case OP_LOAD_I: @@ -491,7 +491,7 @@ pr_xfunction->profile += profile - startprofile; startprofile = profile; pr_xstatement = st - pr_statements; - Host_Error("Progs attempted to read an out of bounds edict number\n"); + Host_Error("Progs attempted to read an out of bounds edict number"); return; } if (OPB->_int < 0 || OPB->_int >= progs->entityfields) @@ -499,7 +499,7 @@ pr_xfunction->profile += profile - startprofile; startprofile = profile; pr_xstatement = st - pr_statements; - Host_Error("Progs attempted to read an invalid field in an edict\n"); + Host_Error("Progs attempted to read an invalid field in an edict"); return; } #endif @@ -519,7 +519,7 @@ pr_xfunction->profile += profile - startprofile; startprofile = profile; pr_xstatement = st - pr_statements; - Host_Error("Progs attempted to write to an invalid indexed global\n"); + Host_Error("Progs attempted to write to an invalid indexed global"); return; } #endif @@ -532,7 +532,7 @@ pr_xfunction->profile += profile - startprofile; startprofile = profile; pr_xstatement = st - pr_statements; - Host_Error("Progs attempted to write to an invalid indexed global\n"); + Host_Error("Progs attempted to write to an invalid indexed global"); return; } #endif @@ -549,7 +549,7 @@ pr_xfunction->profile += profile - startprofile; startprofile = profile; pr_xstatement = st - pr_statements; - Host_Error("Progs attempted to address an out of bounds global\n"); + Host_Error("Progs attempted to address an out of bounds global"); return; } #endif @@ -568,7 +568,7 @@ pr_xfunction->profile += profile - startprofile; startprofile = profile; pr_xstatement = st - pr_statements; - Host_Error("Progs attempted to read an invalid indexed global\n"); + Host_Error("Progs attempted to read an invalid indexed global"); return; } #endif @@ -582,7 +582,7 @@ pr_xfunction->profile += profile - startprofile; startprofile = profile; pr_xstatement = st - pr_statements; - Host_Error("Progs attempted to read an invalid indexed global\n"); + Host_Error("Progs attempted to read an invalid indexed global"); return; } #endif @@ -597,7 +597,7 @@ pr_xfunction->profile += profile - startprofile; startprofile = profile; pr_xstatement = st - pr_statements; - Host_Error("Progs boundcheck failed at line number %d, value is < 0 or >= %d\n", st->b, st->c); + Host_Error("Progs boundcheck failed at line number %d, value is < 0 or >= %d", st->b, st->c); return; } break;