------------------------------------------------------------------------
r4255 | acceptthis | 2013-03-10 23:55:57 +0000 (Sun, 10 Mar 2013) | 2 lines more verbose type-error messages. fix an issue with chars going missing on the last line (reported by Hectate). ------------------------------------------------------------------------ git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4251 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
066dc81d8b
commit
dd68115e58
4 changed files with 39 additions and 26 deletions
|
@ -477,11 +477,12 @@ char *GetTooltipText(editor_t *editor)
|
|||
if (def)
|
||||
{
|
||||
static char buffer[1024];
|
||||
char typebuf[1024];
|
||||
//note function argument names do not persist beyond the function def. we might be able to read the function's localdefs for them, but that's unreliable/broken with builtins where they're most needed.
|
||||
if (def->comment)
|
||||
_snprintf(buffer, sizeof(buffer)-1, "%s %s\r\n%s", TypeName(def->type), def->name, def->comment);
|
||||
_snprintf(buffer, sizeof(buffer)-1, "%s %s\r\n%s", TypeName(def->type, typebuf, sizeof(typebuf)), def->name, def->comment);
|
||||
else
|
||||
_snprintf(buffer, sizeof(buffer)-1, "%s %s", TypeName(def->type), def->name);
|
||||
_snprintf(buffer, sizeof(buffer)-1, "%s %s", TypeName(def->type, typebuf, sizeof(typebuf)), def->name);
|
||||
return buffer;
|
||||
}
|
||||
return NULL;
|
||||
|
@ -1190,7 +1191,7 @@ int EditorSave(editor_t *edit)
|
|||
MessageBox(NULL, "Save failed - not enough mem", "Error", 0);
|
||||
return false;
|
||||
}
|
||||
Edit_GetText(edit->editpane, file, len);
|
||||
Edit_GetText(edit->editpane, file, len+1);
|
||||
if (!QCC_WriteFile(edit->filename, file, len))
|
||||
{
|
||||
MessageBox(NULL, "Save failed\nCheck path and ReadOnly flags", "Failure", 0);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue