aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llviewerkeyboard.cpp
diff options
context:
space:
mode:
authorJacek Antonelli2008-08-15 23:44:50 -0500
committerJacek Antonelli2008-08-15 23:44:50 -0500
commit89fe5dab825a62a0e3fd8d248cbc91c65eb2a426 (patch)
treebcff14b7888d04a2fec799c59369f6095224bd08 /linden/indra/newview/llviewerkeyboard.cpp
parentSecond Life viewer sources 1.13.3.2 (diff)
downloadmeta-impy-89fe5dab825a62a0e3fd8d248cbc91c65eb2a426.zip
meta-impy-89fe5dab825a62a0e3fd8d248cbc91c65eb2a426.tar.gz
meta-impy-89fe5dab825a62a0e3fd8d248cbc91c65eb2a426.tar.bz2
meta-impy-89fe5dab825a62a0e3fd8d248cbc91c65eb2a426.tar.xz
Second Life viewer sources 1.14.0.0
Diffstat (limited to 'linden/indra/newview/llviewerkeyboard.cpp')
-rw-r--r--linden/indra/newview/llviewerkeyboard.cpp25
1 files changed, 18 insertions, 7 deletions
diff --git a/linden/indra/newview/llviewerkeyboard.cpp b/linden/indra/newview/llviewerkeyboard.cpp
index c5ada54..30fa19a 100644
--- a/linden/indra/newview/llviewerkeyboard.cpp
+++ b/linden/indra/newview/llviewerkeyboard.cpp
@@ -703,12 +703,12 @@ S32 LLViewerKeyboard::loadBindings(const char *filename)
703{ 703{
704 FILE *fp; 704 FILE *fp;
705 const S32 BUFFER_SIZE = 2048; 705 const S32 BUFFER_SIZE = 2048;
706 char buffer[BUFFER_SIZE]; 706 char buffer[BUFFER_SIZE]; /* Flawfinder: ignore */
707 // *NOTE: This buffer size is hard coded into scanf() below. 707 // *NOTE: This buffer size is hard coded into scanf() below.
708 char mode_string[MAX_STRING]; 708 char mode_string[MAX_STRING]; /* Flawfinder: ignore */
709 char key_string[MAX_STRING]; 709 char key_string[MAX_STRING]; /* Flawfinder: ignore */
710 char mask_string[MAX_STRING]; 710 char mask_string[MAX_STRING]; /* Flawfinder: ignore */
711 char function_string[MAX_STRING]; 711 char function_string[MAX_STRING]; /* Flawfinder: ignore */
712 S32 mode = MODE_THIRD_PERSON; 712 S32 mode = MODE_THIRD_PERSON;
713 KEY key = 0; 713 KEY key = 0;
714 MASK mask = 0; 714 MASK mask = 0;
@@ -716,10 +716,15 @@ S32 LLViewerKeyboard::loadBindings(const char *filename)
716 S32 binding_count = 0; 716 S32 binding_count = 0;
717 S32 line_count = 0; 717 S32 line_count = 0;
718 718
719 fp = LLFile::fopen(filename, "r"); 719 fp = LLFile::fopen(filename, "r"); /* Flawfinder: ignore */
720 720
721 if (!fp) 721 if (!fp)
722 { 722 {
723 if(!filename)
724 {
725 llerrs << " No filename specified" << llendl;
726 return 0;
727 }
723 return 0; 728 return 0;
724 } 729 }
725 730
@@ -734,7 +739,13 @@ S32 LLViewerKeyboard::loadBindings(const char *filename)
734 if (buffer[0] == '#' || buffer[0] == '\n') continue; 739 if (buffer[0] == '#' || buffer[0] == '\n') continue;
735 740
736 // grab the binding strings 741 // grab the binding strings
737 tokens_read = sscanf(buffer, "%254s %254s %254s %254s", mode_string, key_string, mask_string, function_string); 742 tokens_read = sscanf( /* Flawfinder: ignore */
743 buffer,
744 "%254s %254s %254s %254s",
745 mode_string,
746 key_string,
747 mask_string,
748 function_string);
738 749
739 if (tokens_read == EOF) 750 if (tokens_read == EOF)
740 { 751 {