summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
f52a78a)
In the process, fix another case-smashing bug.
#include <stdlib.h>
#include <stdbool.h>
#include <stdlib.h>
#include <stdbool.h>
#include "advent.h"
#include "dungeon.h"
#include "advent.h"
#include "dungeon.h"
static int say(struct command_t *command)
/* Say. Echo WD2 (or WD1 if no WD2 (SAY WHAT?, etc.).) Magic words override. */
{
static int say(struct command_t *command)
/* Say. Echo WD2 (or WD1 if no WD2 (SAY WHAT?, etc.).) Magic words override. */
{
- long a = command->wd1, b = command->wd1x;
if (command->wd2 > 0) {
a = command->wd2;
if (command->wd2 > 0) {
a = command->wd2;
command->wd1 = command->wd2;
command->wd1 = command->wd2;
+ strcpy(command->raw1, command->raw2);
}
char word1[TOKLEN+1];
packed_to_token(command->wd1, word1);
}
char word1[TOKLEN+1];
packed_to_token(command->wd1, word1);
wordclear(&command->wd2);
return GO_LOOKUP;
}
wordclear(&command->wd2);
return GO_LOOKUP;
}
- rspeak(OKEY_DOKEY, a, b);
+ sspeak(OKEY_DOKEY, command->raw1);
enum speechpart part;
vocab_t verb;
vocab_t obj;
enum speechpart part;
vocab_t verb;
vocab_t obj;
- token_t wd1, wd1x;
- token_t wd2, wd2x;
+ token_t wd1;
+ token_t wd2;
char raw1[BUFSIZ], raw2[BUFSIZ];
};
char raw1[BUFSIZ], raw2[BUFSIZ];
};