Compare commits

...

5 commits
0.5.12 ... main

Author SHA1 Message Date
40e38578bb
c 2025-04-20 20:16:30 -04:00
c7cbcd39ad
nvm 2025-04-20 20:11:10 -04:00
692688dbbd
fix url 2025-04-20 20:10:50 -04:00
fac2179c23
hopefully fix the paging issue 2025-04-17 09:43:20 -04:00
9b196f0b13
fix weird newline issue 2025-04-17 09:27:13 -04:00
3 changed files with 10 additions and 3 deletions

View file

@ -4,7 +4,7 @@ This is an elemental combination game written in C, with optional multi-player s
## Clients
- [PenguinMod client](https://studio.penguinmod.com/?fps=200&clones=Infinity&offscreen&size=850x480#7218964246) for playing the game online with a fancy interface
- [Discord client](https://discord.gg/DKZTWyWH3B) for playing the game publicly with other Discord members
- [Web client](https://elem.dervland.net/) for a demo of the multiplayer version
- [Web client](https://elem.dervland.net/index.html) for a demo of the multiplayer version
- [Original client](https://git.dervland.net/elemental/elemental-on-terminal/releases) for developers, administrators, and command line fans
## Single-player

View file

@ -143,8 +143,13 @@ int success_handler(const void *key, size_t size, uintptr_t val, void *usr) {
}
char *handle_pages(char *command, char *invs) {
char *data;
char *data2;
if (strncmp(command, invs, strlen(invs)) == 0) {
return &command[strlen(invs)];
data = &command[strlen(invs)];
data2 = malloc(strlen(data) + 1);
memcpy(data2,data,strlen(data) + 1);
return data2;
} else {
return 0;
}

View file

@ -26,7 +26,9 @@ int entry_handler(const void *key, size_t size, uintptr_t val, void *usr) {
}
} else if (usr2->mode == 1) {
fwrite(key2, sizeof(char), strlen(key2), usr2->fptr);
if (key2[strlen(key2) - 1] != '\n') {
fwrite("\n", sizeof(char), 1, usr2->fptr);
}
} else {
fwrite(key2, sizeof(char), strlen(key2), usr2->fptr);
fwrite(";", sizeof(char), 1, usr2->fptr);