X-Git-Url: https://jxself.org/git/?p=super-star-trek.git;a=blobdiff_plain;f=src%2Fplanets.c;h=8d387af691a5404025307dfe759070ffd455a36f;hp=dd04b621b9ee330409cdcc676358e48336b15493;hb=fec5bf04131385b55dc3b0ad9c7d8d245a7d07da;hpb=fbb4aa04129c7e9fbe17428c5e151d4afbdd039e diff --git a/src/planets.c b/src/planets.c index dd04b62..8d387af 100644 --- a/src/planets.c +++ b/src/planets.c @@ -512,9 +512,10 @@ void deathray(void) char *systemname(int pindx) { - /* the below array shoud not be static, or it won't gettextize + static char copy[BUFSIZ]; + /* the below array should not be static, or it won't gettextize * because of the early initialization. */ - char *names[NINHAB] = + char *names[NINHAB+1] = { /* * I used to find planets @@ -553,7 +554,7 @@ char *systemname(int pindx) _("Marcos XII"), /* TOS: "And the Children Shall Lead", */ _("Omega IV"), /* TOS: "The Omega Glory" */ _("Regulus V"), /* TOS: "Amok Time */ - _("Deeva"), /* TOS: "Operation -- Annihilate!" */ + _("Deneva"), /* TOS: "Operation -- Annihilate!" */ /* Worlds from BSD Trek */ _("Rigel II"), /* TOS: "Shore Leave" ("III" in BSD) */ _("Beta III"), /* TOS: "The Return of the Archons" */ @@ -570,7 +571,8 @@ char *systemname(int pindx) _("Coridan (Desotriana)"), /* TOS: "Journey to Babel" */ _("Iotia"), /* TOS: "A Piece of the Action" */ #endif - }; + }; - return names[pindx]; + strcpy(copy, names[pindx]); + return copy; }