Commit graph

614 commits

Author SHA1 Message Date
Thomas Arp
ba7dc7bf6f convert docs files to utf-8 2025-07-02 21:26:19 +02:00
Thomas Arp
558e71eed8 ignore .idea from clion IDE 2025-07-02 21:25:34 +02:00
Thomas Arp
b471ff195e
avoid freeing obj_proto[].name. (#149)
fixes #148
2025-05-06 23:15:06 +02:00
Rumble
392f3d90b8 Staying ahead of the power curve 2025-04-16 12:24:37 -07:00
Thomas Arp
be8de64cf8
fix buffer overrun act.informative.c (#146)
Ref https://www.tbamud.com/kunena/4-development/5636-bug-in-do-toggle-in-act-informative-c#10540

Thanks to Ironfist for the fix
2025-02-19 21:18:39 +01:00
Rumble
5024dd8e66 Updated for 2025 release 2025-01-09 23:57:59 +00:00
Thomas Arp
69888a5d89
Update aedit.c (#145)
fixes #144 

Thanks to @gbstott for the bug report
2025-01-08 22:57:39 +01:00
haloway13
1ccb6adaee
Update dg_olc.c (#143)
Better auto-formatting of dg_scripts. Thanks to haloway13 for the patch.
2025-01-01 11:05:54 +01:00
Thomas Arp
d3227f1300
Fix bug in process_output (#140)
Based on error report from JTP in the tbamud forums. If an attacker was able to start a session and then break the connection, the  process_output function would fail. This would trigger two calls to close_socket on the same descriptor. This in turn results in a double free on the character struct.

https://www.tbamud.com/kunena/4-development/5617-another-core-dump-not-long-after-the-one-earlier
Thanks to JTP for the bug report.
2024-12-30 12:30:29 +01:00
Thomas Arp
88b3027ec6
Bugfix/135 while freezes the mud (#138)
* Added loop counter per while instead of global. fixes #135

* Revert "Added loop counter per while instead of global. fixes #135"

This reverts commit 59cf6a1fb2.

* Remove extraneous reset of loop var.

Fixes #135

Thanks to bylins for the fix - https://github.com/bylins
2024-09-28 20:29:11 +02:00
Victor Augusto Borges Dias de Almeida
7036a15782
Changes to make the code compile normally on macOS. (#137)
Changes in configure to set crypt lib dynamically depending on the OS
2024-09-22 11:15:28 +02:00
welcor
e59420363a Merge branch 'master' of git@github.com:tbamud/tbamud.git 2024-09-16 22:26:44 +02:00
Thomas Arp
c838a513dd
Added loop counter per while instead of global. fixes #135 (#136) 2024-09-16 22:25:29 +02:00
welcor
ed9e5e1c5a Merge branch 'master' of github.com:tbamud/tbamud 2024-06-20 22:48:59 +02:00
Dan Danese
762cb77c60
Fix a bug with the prior commit for handling triggers. It should have (#132)
continued the loop, not returned since it isn't likely to be the end of
the wld file.

Added the ability to specify multiple files on the command line. This
will load all files passed before processing into html files. This is to
fix the 'missing exits' from the output html files. The prior version
only worked on a single zone or wld file and generated incomplete
output. The record count was moved global to enable proper tracking of
the entire world. The index_boot function was modified to scan the files
first, get a record count, then start over and load the room records.

example usage: wld2html *.wld

This command will generate the entire world as one html file per room.

Fixed room number roll over. The original was using a short int which is
a 16bit int and rolls at 32k.

Fixed an issue where the html files would get negative names due to
integer rollover. It had something to do with sprintf an int using %d,
but only if you passed that to fopen. Casting the int (room number) to
a long before using sprintf with %ld fixed the issue.

Added the missing four directions from the dir_names array and defines.

Co-authored-by: Dan Danese <biouxtia@danese.us>
2024-06-20 19:56:51 +02:00
Thomas Arp
317286d051
Ignore project files on commit, and fix the automap bug showing two (#133)
descriptions
2024-06-20 19:31:20 +02:00
Dan Danese
ac711ffff8
Update wld2html.c (#131)
Triggers on elements of the room break this utility. Added code to toss them since we don't need them. Can add handling that pulls the trigger info later if desired, but too time consuming to index them before building the room for this simple tool.
2024-06-18 20:56:13 +02:00
Thomas Arp
cde4b84be1
Update FAQ.txt (#130)
Added info about generated maps for the areas on tbaMUD
2024-06-08 12:12:54 +02:00
Nick Schmoyer
5da67ddc6a
Add missing lookup for flags in read_ibt (#128) 2024-03-02 23:11:28 +01:00
Roman Shapiro
b2d38522e0
Added new easy way of building TbaMUD in the Visual Studio through the CMake (#127)
* Added new experimental MSVC build way through CMake

* Small build/README.md fix
2023-11-19 04:04:39 +01:00
Serge
498b652546
fixed small bug in toggle showvnum (#125)
Thanks, @prool
2023-01-07 15:43:06 +01:00
Rumble
213e52d255 Updated for 2023 release 2023-01-02 14:23:51 +00:00
Steaphan Greene
79e2f91894
Fix (remove) rogue non-ascii character from socials.new. (#123)
This character isn't ascii, nor even utf8.  It doesn't serve any real
textual purpose either, so, just delete it.
2022-12-05 12:53:37 +01:00
Thomas Arp
7f495670f2
Bugfix: the "rest" is added but was never subtracted. (#120) 2022-11-16 23:08:51 +01:00
tjr1974
e9c9808a24
Update act.informative.c (#119)
Fixed formatting for readability.
Indentations should be correct.
Tested on fresh install. 
It does compile. 
Room descriptions display properly.
2022-11-16 23:08:33 +01:00
Thomas Arp
c9ebc7174c
Create build.yml (#117)
Support for building pull requests with github actions
2022-11-06 23:41:31 +01:00
Thomas Arp
bde600051d
Merge pull request #114 from Vatiken/master
Replaced missing semi-colon. -No Compile
2022-11-05 12:53:30 +01:00
Thomas Arp
a745935421
Merge pull request #113 from tbamud/zusuk-patch-1
Added check for NOTHING key in has_key()
2022-11-05 12:53:05 +01:00
Joseph
0ee3aac10d Replaced missing semi-colon. -No Compile 2022-11-04 21:02:35 -03:00
Thomas Arp
15074b1d93
Added check for NOTHING key in has_key() 2022-11-02 22:31:56 +01:00
Thomas Arp
8f67dd880c
Merge pull request #110 from tjr1974/master
Fixes & Code Quality
2022-10-25 00:36:18 +02:00
tjr1974
34aca229df
Update act.informative.c
Used code formatter to correct indentations and align all {} in lACMD(do_exits)
Checked for unmactched braces and found none.
My code editor shows all {} are matched.
2022-10-24 17:07:54 -05:00
tjr1974
041765438a
Update act.informative.c
Used code formatter to correct indentations and align all {} in the look_at_room()
Checked for unmactched braces and found none.
My code editor shows all {} are matched.
2022-10-24 16:38:11 -05:00
tjr1974
59398b2fdc
Update handler.c
Fixes indentations in obj_to_room()
2022-10-24 16:07:49 -05:00
tjr1974
97bd28ffd3
Update act.informative.c
Fixes unguarded blocks of code in ACMD(do_exits) that could cause the server to report scripted trigger events (mob movements, exit links to rooms being reassigned, and doors being opened or closed) as script errors. Particularly, if this code is copy and pasted into the do_auto_exits().
2022-10-23 15:29:43 -05:00
tjr1974
7039f9c402
Update act.informative.c
Fixes unguarded else clauses due to inconsistent use of {} in look_at_room().
2022-10-23 15:12:57 -05:00
tjr1974
3635026433
Update handler.c
Fixes the display order of objects in obj_to_room().
Objects are now displayed in the order they are placed/dropped. This prevents fountains, boards, etcetera from "moving" around the room.
2022-10-23 14:57:14 -05:00
Thomas Arp
16a46903e4
Merge pull request #103 from mackerel3/antipattern
use strncat(sizeof(...) - strlen(...) - 1)
2022-09-03 12:33:01 +02:00
Mackerel
2d8c05b4ed use strncat(sizeof(...) - strlen(...) - 1) 2022-09-03 00:11:03 -04:00
Thomas Arp
95d4da4972
Merge pull request #101 from ktpx/recent
inc size of name, max length names crash on addrecent due to buffer o…
2022-03-25 00:03:13 +01:00
Thomas
9c801f9ab6 inc size of name, max length names crash on addrecent due to buffer overflow 2022-03-24 22:46:43 +01:00
Rumble
5305783e1b Fixed World file errors 2021-03-06 19:29:28 +00:00
Rumble
68dd901943 Updated for 2021 release 2021-03-06 15:50:00 +00:00
Noah Cunningham
547c7ddccf
Fix for pointer in fread() db.c to fix Raspberry Pi load issue (#97)
This corrects an issue encountered when loading world information on the Raspberry Pi. Sometimes, there is a ~ stored in the memory location in front of tmp char array. The for loop will decrement below the starting memory address, making it read the ~ and think it's at the end of the room, causing an error and preventing the MUD from loading.

This change checks the memory address of tmp, ensuring it is > the starting memory address before decrementing it in the for() loop. Then, the if/else checks to ensure the carriage return and newline are properly placed to prevent duplication.
2020-11-16 12:36:04 -05:00
MBourne
dceb563a9b
Bug/drink containers (#94)
* Bugfix for name_from_drinkcon

* Newline at end of utils.c
2020-06-07 08:52:22 -04:00
Thomas Arp
c0fb6f8a71
Correct log message for strange room flags (#88)
Thanks to Cunning on the tba board for the bug report
https://www.tbamud.com/forum/4-development/4548-db-c-typo-in-parse-rooms#8633
2020-04-16 20:12:34 -04:00
Thomas Arp
1f520546b2
Merge pull request #84 from tbamud/crash-bug-in-object-drop-script
Crash bug in object drop script
2020-03-08 23:57:15 +01:00
Thomas Arp
6fede208d2
Gcc 9.2.1 warnings (#87)
* Make sure all followers are free'd before freeing the character list

Otherwise, the followers structs will point to free'd memory and
the stop_follower call will attempt to dereference a free'd
characters' followers list.

* fix gcc warning: truncation in strncat

In file included from /usr/include/string.h:494,
from sysdep.h:74,
from act.item.c:12:
In function ‘strncat’,
inlined from ‘name_from_drinkcon’ at act.item.c:804:5,
inlined from ‘name_from_drinkcon’ at act.item.c:769:6:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:136:10: warning: ‘__builtin_strncat’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation]
136 | return __builtin___strncat_chk (__dest, __src, __len, __bos (__dest));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
act.item.c: In function ‘name_from_drinkcon’:
act.item.c:797:16: note: length computed here
797 | cpylen = strlen(cur_name);
| ^~~~~~~~~~~~~~~~

* Whitespace cleanup before bugfix

* Fix warnings for gcc-9.2.1

Also, fixed an ancient FIXME and a known bad strcat usage.

spell_parser.c: In function ‘say_spell’:
spell_parser.c:135:75: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 216 [-Wformat-truncation=]
135 | snprintf(buf1, sizeof(buf1), "$n stares at you and utters the words, '%s'.",
| ^~
In file included from /usr/include/stdio.h:867,
from sysdep.h:69,
from spell_parser.c:12:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output between 43 and 298 bytes into a destination of size 256
2020-03-08 08:33:59 -04:00
Thomas Arp
fc223452e8 Fix typo in previous commit.
Also, inline lookup functions if possible.
2020-03-07 23:24:32 +01:00
Thomas Arp
a60f0eefb8 Minor bugfix in code that should be unreachable.
We already log that we update, but no update was taking place.
2020-03-07 23:22:01 +01:00