| Server IP : 82.208.35.60 / Your IP : 216.73.217.116 Web Server : Apache/2.4.55 (FreeBSD) OpenSSL/1.1.1q-freebsd PHP/7.3.31 System : FreeBSD server7.d2m.cz 12.4-RELEASE-p9 FreeBSD 12.4-RELEASE-p9 GENERIC amd64 User : studiokobylisy_cz ( 1008) PHP Version : 7.3.31 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /usr/ports/math/rexx-regmath/files/ |
Upload File : |
--- rxmath.c.orig 2001-11-04 22:23:42 UTC
+++ rxmath.c
@@ -116,8 +116,8 @@ static rxfunc(trigfunc1)
rxstrdup(arg, argv[0]);
/* argument might be in degrees or grades */
- if (argc > 2) {
- switch (argv[2].strptr[0]) {
+ if (argc > 1 && argv[1].strptr != NULL) {
+ switch (argv[1].strptr[0]) {
/* degrees -- convert to radians */
case 'd':
case 'D':
@@ -144,7 +144,7 @@ static rxfunc(trigfunc1)
argval = atof(arg) * PI/180.;
}
- result->strlength = setresult(result->strptr, theFunc->fnptr(argval), argc - 1, argv+1);
+ result->strlength = setresult(result->strptr, theFunc->fnptr(argval), argc - 2, argv+2);
return 0;
@@ -170,8 +170,8 @@ static rxfunc(trigfunc2)
res = theFunc->fnptr(atof(arg));
/* result could be needed in degrees or grades */
- if (argc > 2) {
- switch (argv[2].strptr[0]) {
+ if (argc > 1 && argv[1].strptr != NULL) {
+ switch (argv[1].strptr[0]) {
/* degrees -- convert radians to degrees */
case 'd':
case 'D':
@@ -198,7 +198,7 @@ static rxfunc(trigfunc2)
res *= 180./PI;
}
- result->strlength = setresult(result->strptr, res, argc - 1, argv+1);
+ result->strlength = setresult(result->strptr, res, argc - 2, argv+2);
return 0;
}