Goober5000
2e2c1afe38
there is actually a way to check for extra sound values per Mantis #2048 , and here it is
2012-12-17 05:54:18 +00:00
Goober5000
bc26caba28
follow-up to 9355: since we have a version of get_string that accepts SCP_string, just use that
2012-11-19 05:36:05 +00:00
The_E
def96b21d2
Increase the buffer size for stuff_string_list(SCP_vector<SCP_string>) to 2048. If this function was used with substrings longer than NAME_LENGTH, this would cause stack corruption due to a buffer overrun.
2012-11-18 17:58:05 +00:00
Goober5000
acac926656
update const-correctness
2012-10-01 03:19:31 +00:00
Goober5000
fcbf33aeab
some const stuff, useful for the sounds patch
2012-07-26 07:46:35 +00:00
Goober5000
a687fbbf1b
this is a slightly modified version of m!m's patch for Mantis #2688
2012-07-15 18:48:42 +00:00
Goober5000
fdd685fb8a
we want to truncate based on number of lines, not number of characters
...
also, we want to truncate the FRED error message boxes too
(this is a better fix for Mantis #2658 )
2012-07-14 06:23:45 +00:00
Echelon9
bd405ee457
GCC warning: converting to non-pointer type 'char' from NULL
2012-05-27 13:32:08 +00:00
Goober5000
1d4dee495a
if we are ignoring whitespace and we encounter a newline, don't eat it
2012-05-15 01:27:38 +00:00
Goober5000
63a78e79fd
modular credits.tbl, courtesy of m!m
...
(with a few tiny tweaks)
2012-04-12 03:49:47 +00:00
niffiwan
5a873d6646
Fix gcc compile error with yet more const ness
2012-03-08 10:55:22 +00:00
Goober5000
b146b10403
MOAR const-correctness!
2012-03-08 08:12:56 +00:00
Goober5000
7d4fd7ee2a
convert briefing and debriefing to use SCP_string
2012-03-07 05:23:21 +00:00
Goober5000
5127340279
per discussion with mjn.mixael, fix error function so that it doesn't break on messages that are too long
2012-03-07 01:52:30 +00:00
Goober5000
1e23f07948
fix the algorithm for trimming whitespace
2012-03-06 05:11:55 +00:00
Goober5000
0d3f28e8d4
enhance vsprintf for SCP_string to be more intelligent in how it handles specifiers
2012-03-05 09:09:15 +00:00
Goober5000
97002e90ca
use SCP_string internally in stuff_and_malloc_string to remove the need for huge temporary buffers
...
also fix a Volition derp with the function prototype: if you're mallocing a string, you don't need a maximum length
2012-03-05 06:20:23 +00:00
Goober5000
79e4c58064
just derping along
2012-03-05 05:49:25 +00:00
Goober5000
d22ad134fd
a vsprintf equivalent is useful
2012-03-05 05:24:15 +00:00
Echelon9
9ae918ead4
Fix SCP_string parselo code - std::string.c_str() function means it's a string being passed to Error(), not the whole std::string object
2012-03-04 07:50:47 +00:00
Goober5000
e2ccd37673
derp
2012-03-04 06:54:56 +00:00
Goober5000
83b09269f4
add variants of replace_one and replace_all
2012-03-04 03:59:29 +00:00
Goober5000
02def13365
add SCP_string variants of parselo functions
2012-03-04 00:20:09 +00:00
Goober5000
abeb98a566
change stuff_vector to stuff_vec3d for clarity, since "vector" now refers to a dynamic list and "vec3d" now refers to the three-float struct
2012-03-02 04:26:44 +00:00
IssMneur
e496117892
From CommanderDJ: add check_for_eoln() to parselo.cpp.
2011-12-09 05:48:35 +00:00
The_E
531a7c71bb
Revert 7791. Something went wrong there.
2011-09-24 18:31:20 +00:00
The_E
a982eb153d
Remove more useless encryption stuff. NOTE FOR PROJECT FILE MAINTAINERS: parse/encrypt.(cpp|h) should no longer be part of the project.
2011-09-24 17:37:12 +00:00
IssMneur
dedd73a3f5
Lets try this again without templates that VC6 doesn't like (this time for real).
...
Use const strings in split_str.
2011-09-12 05:14:58 +00:00
Goober5000
3597538bde
revert 7705... it did, in fact, contain templates that VC6 doesn't like
2011-09-12 05:01:57 +00:00
IssMneur
10809783f9
Lets try this again without templates that VC6 doesn't like.
...
Use const strings in split_str.
2011-09-12 04:03:56 +00:00
The_E
834e383c26
Marking a bunch of PVS Studio warnings as false alarms. While the warnings are technically correct, none of these are in places where performance matters.
2011-09-04 12:31:33 +00:00
Goober5000
7931831cbe
add dynamic vector stuffing
2011-08-28 03:31:46 +00:00
Echelon9
a248a37d58
PVS-Studio: Fix V805. Decreased performance. It is inefficient to identify an empty string by using 'strlen(str) > 0' construct
2011-08-24 13:37:01 +00:00
Goober5000
f492ce292c
revert 7508, which MSVC6 doesn't like
2011-08-22 07:58:00 +00:00
IssMneur
80d3b0ed84
- make split_str use const strings were appropriate.
...
- make brief_color_text_init use const strings where appropriate.
2011-08-21 17:05:04 +00:00
Goober5000
ce48784a5f
add some sanity protections against overstuffing arrays
2011-08-19 04:39:12 +00:00
Goober5000
10d6e21c9d
fix some things that Zacam noticed
2010-11-23 07:30:36 +00:00
Echelon9
9f361b791d
Fix a few malloc/vm_malloc changes to properly track memory usage; fix a potential NULL dereference in parse/lua.cpp
2010-11-20 08:25:16 +00:00
Goober5000
8ba6a7035c
add SCP_string variants of sprintf, sexp_replace_variable_names_with_values, replace_one, replace_all, and lcl_replace_stuff
...
change the death message to use an SCP_string
change the set-death-message sexp to accept actual messages
2010-11-14 02:07:45 +00:00
The_E
3397d3a21e
From FUBAR: Patch to redirect a warning popup to the log when in standalone mode.
2010-08-26 22:56:36 +00:00
Goober5000
434059b5a2
commit the revision patch originally inspired by Zacam
2009-12-05 22:53:04 +00:00
Goober5000
33203d244a
add useful parselo function
2009-11-18 08:59:35 +00:00
portej05
cbaf0e5cc3
Fix more incorrect uses of memset causing crashes
2009-11-13 13:22:59 +00:00
portej05
0de4a7d9ae
Fix for WiH crashes - I reckon this might be the cause of a few peoples problems (using bitwise & instead of logical &&)
2009-09-06 07:41:14 +00:00
portej05
c5ee5f5e33
Bump buffers causing safe_strings asserts
2009-07-19 07:56:04 +00:00
portej05
3ac9167ac7
Some safe_strings in use!
...
Note that I couldn't figure out the buffer size for some of them, so they haven't been changed. The buffer size should be passed as a function argument in future.
2009-07-16 15:18:11 +00:00
portej05
6a8d45c93d
Replace most instances of std::vector with SCP_vector. Memory is now all run through vm_malloc and vm_free.
...
Watch it go up AND down in mission.
2009-07-11 07:07:57 +00:00
portej05
bdd1f5ff9f
Missed a few! (CVS Comment blocks)
2009-07-04 13:39:58 +00:00
karajorma
f24633cba2
New bug uncovers old bug. Neither particularly serious but both were annoying Diaspora debug builds.
2009-07-02 17:32:32 +00:00
Echelon9
98f27b88dd
Fix for required_string_4() and readability in ship.cpp
2009-06-20 09:59:04 +00:00