ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/common/shstr.C
(Generate patch)

Comparing deliantra/server/common/shstr.C (file contents):
Revision 1.39 by root, Mon Oct 12 14:00:57 2009 UTC vs.
Revision 1.40 by root, Wed Nov 4 00:02:48 2009 UTC

140#undef def 140#undef def
141#undef def2 141#undef def2
142 142
143shstr skill_names[NUM_SKILLS]; 143shstr skill_names[NUM_SKILLS];
144 144
145//TODO: this should of course not be here
146
147/* buf_overflow() - we don't want to exceed the buffer size of
148 * buf1 by adding on buf2! Returns true if overflow will occur.
149 */
150int
151buf_overflow (const char *buf1, const char *buf2, int bufsize)
152{
153 int len1 = 0, len2 = 0;
154
155 if (buf1)
156 len1 = strlen (buf1);
157
158 if (buf2)
159 len2 = strlen (buf2);
160
161 if ((len1 + len2) >= bufsize)
162 return 1;
163
164 return 0;
165}

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines