Skip to content

Commit

Permalink
added file stats.c
Browse files Browse the repository at this point in the history
  • Loading branch information
Shubham Vasudeo Desai committed Feb 25, 2025
1 parent 7ffb046 commit 5558b6d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions raster/r.kappa/stats.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,16 @@ int stats(void)
const char *argv[9];
int argc = 0;

strcpy(mname, maps[1]);
if (G_strlcpy(mname, maps[1], sizeof(mname)) >= sizeof(mname)) {
G_fatal_error(_("Raster map name <%s> is too long"), maps[1]);
}
mmapset = G_find_raster2(mname, "");
if (mmapset == NULL)
G_fatal_error(_("Raster map <%s> not found"), maps[0]);

strcpy(rname, maps[0]);
if (G_strlcpy(rname, maps[0], sizeof(rname)) >= sizeof(rname)) {
G_fatal_error(_("Raster map name <%s> is too long"), maps[0]);
}
rmapset = G_find_raster2(rname, "");
if (rmapset == NULL)
G_fatal_error(_("Raster map <%s> not found"), maps[1]);
Expand Down

0 comments on commit 5558b6d

Please sign in to comment.