aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llviewermenu.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--linden/indra/newview/llviewermenu.cpp23
1 files changed, 13 insertions, 10 deletions
diff --git a/linden/indra/newview/llviewermenu.cpp b/linden/indra/newview/llviewermenu.cpp
index 921e650..3e5063e 100644
--- a/linden/indra/newview/llviewermenu.cpp
+++ b/linden/indra/newview/llviewermenu.cpp
@@ -3965,6 +3965,7 @@ void force_import_geometry(void*)
3965 child = root->getNextNamedChild()) 3965 child = root->getNextNamedChild())
3966 { 3966 {
3967 // get object data 3967 // get object data
3968 // *NOTE: This buffer size is hard coded into scanf() below.
3968 char name[255]; // Shape 3969 char name[255]; // Shape
3969 char description[255]; // Description 3970 char description[255]; // Description
3970 U32 material; // Material 3971 U32 material; // Material
@@ -3997,9 +3998,9 @@ void force_import_geometry(void*)
3997 child->getAttributeString("PCode", &attribute); 3998 child->getAttributeString("PCode", &attribute);
3998 pcode = atoi(attribute.c_str()); 3999 pcode = atoi(attribute.c_str());
3999 child->getAttributeString("Shape", &attribute); 4000 child->getAttributeString("Shape", &attribute);
4000 sscanf(attribute.c_str(), "%s", name); 4001 sscanf(attribute.c_str(), "%254s", name);
4001 child->getAttributeString("Description", &attribute); 4002 child->getAttributeString("Description", &attribute);
4002 sscanf(attribute.c_str(), "%s", description); 4003 sscanf(attribute.c_str(), "%254s", description);
4003 child->getAttributeString("Material", &attribute); 4004 child->getAttributeString("Material", &attribute);
4004 material = atoi(attribute.c_str()); 4005 material = atoi(attribute.c_str());
4005 child->getAttributeString("Scale", &attribute); 4006 child->getAttributeString("Scale", &attribute);
@@ -4079,6 +4080,7 @@ void force_import_geometry(void*)
4079 // read the faces 4080 // read the faces
4080 U32 facenumber; 4081 U32 facenumber;
4081 LLColor4 color; 4082 LLColor4 color;
4083 // *NOTE: This buffer size is hard coded into scanf() below.
4082 char texture[UUID_STR_LENGTH]; 4084 char texture[UUID_STR_LENGTH];
4083 LLUUID texid; 4085 LLUUID texid;
4084 texid.toString(texture); 4086 texid.toString(texture);
@@ -4089,7 +4091,7 @@ void force_import_geometry(void*)
4089 face->getAttributeString("FaceColor", &attribute); 4091 face->getAttributeString("FaceColor", &attribute);
4090 sscanf(attribute, "%d %f %f %f %f", &facenumber, &color.mV[VX], &color.mV[VY], &color.mV[VZ], &color.mV[VW]); 4092 sscanf(attribute, "%d %f %f %f %f", &facenumber, &color.mV[VX], &color.mV[VY], &color.mV[VZ], &color.mV[VW]);
4091 face->getAttributeString("Face", &attribute); 4093 face->getAttributeString("Face", &attribute);
4092 sscanf(attribute, "%d %f %f %f %f %f %d %s", &facenumber, &sx, &sy, &ox, &oy, &rot, &bump, texture); 4094 sscanf(attribute, "%d %f %f %f %f %f %d %36s", &facenumber, &sx, &sy, &ox, &oy, &rot, &bump, texture);
4093 texid.set(texture); 4095 texid.set(texture);
4094 te.setColor(color); 4096 te.setColor(color);
4095 te.setBumpShinyFullbright(bump); 4097 te.setBumpShinyFullbright(bump);
@@ -5025,7 +5027,7 @@ const char* upload_pick(void* data)
5025 LLFilePicker::ELoadFilter type; 5027 LLFilePicker::ELoadFilter type;
5026 if(data) 5028 if(data)
5027 { 5029 {
5028 type = (LLFilePicker::ELoadFilter)((S32)data); 5030 type = (LLFilePicker::ELoadFilter)((intptr_t)data);
5029 } 5031 }
5030 else 5032 else
5031 { 5033 {
@@ -5506,7 +5508,8 @@ void upload_new_resource(const LLString& src_filename, std::string name,
5506 if (fscanf(in, "LindenResource\nversion %d\n", &version)) 5508 if (fscanf(in, "LindenResource\nversion %d\n", &version))
5507 { 5509 {
5508 if (2 == version) 5510 if (2 == version)
5509 { 5511 {
5512 // *NOTE: This buffer size is hard coded into scanf() below.
5510 char label[MAX_STRING]; 5513 char label[MAX_STRING];
5511 char value[MAX_STRING]; 5514 char value[MAX_STRING];
5512 S32 tokens_read; 5515 S32 tokens_read;
@@ -5514,7 +5517,7 @@ void upload_new_resource(const LLString& src_filename, std::string name,
5514 { 5517 {
5515 label[0] = '\0'; 5518 label[0] = '\0';
5516 value[0] = '\0'; 5519 value[0] = '\0';
5517 tokens_read = sscanf(buf, "%s %s\n", label, value); 5520 tokens_read = sscanf(buf, "%254s %254s\n", label, value);
5518 5521
5519 llinfos << "got: " << label << " = " << value 5522 llinfos << "got: " << label << " = " << value
5520 << llendl; 5523 << llendl;
@@ -5930,7 +5933,7 @@ void handle_export_selected( void * )
5930 5933
5931BOOL menu_check_build_tool( void* user_data ) 5934BOOL menu_check_build_tool( void* user_data )
5932{ 5935{
5933 S32 index = (S32) user_data; 5936 S32 index = (intptr_t) user_data;
5934 return gCurrentToolset->isToolSelected( index ); 5937 return gCurrentToolset->isToolSelected( index );
5935} 5938}
5936 5939
@@ -6223,7 +6226,7 @@ class LLObjectEnableSitOrStand : public view_listener_t
6223 { 6226 {
6224 bool new_value = false; 6227 bool new_value = false;
6225 LLViewerObject* dest_object = NULL; 6228 LLViewerObject* dest_object = NULL;
6226 if(dest_object = gObjectList.findObject(gLastHitObjectID)) 6229 if((dest_object = gObjectList.findObject(gLastHitObjectID)))
6227 { 6230 {
6228 if(dest_object->getPCode() == LL_PCODE_VOLUME) 6231 if(dest_object->getPCode() == LL_PCODE_VOLUME)
6229 { 6232 {
@@ -8075,7 +8078,7 @@ void handle_debug_avatar_textures(void*)
8075 8078
8076void handle_grab_texture(void* data) 8079void handle_grab_texture(void* data)
8077{ 8080{
8078 LLVOAvatar::ETextureIndex index = (LLVOAvatar::ETextureIndex) ((U32) data); 8081 LLVOAvatar::ETextureIndex index = (LLVOAvatar::ETextureIndex)((intptr_t)data);
8079 LLVOAvatar* avatar = gAgent.getAvatarObject(); 8082 LLVOAvatar* avatar = gAgent.getAvatarObject();
8080 if ( avatar ) 8083 if ( avatar )
8081 { 8084 {
@@ -8166,7 +8169,7 @@ void handle_grab_texture(void* data)
8166 8169
8167BOOL enable_grab_texture(void* data) 8170BOOL enable_grab_texture(void* data)
8168{ 8171{
8169 LLVOAvatar::ETextureIndex index = (LLVOAvatar::ETextureIndex) ((U32) data); 8172 LLVOAvatar::ETextureIndex index = (LLVOAvatar::ETextureIndex)((intptr_t)data);
8170 LLVOAvatar* avatar = gAgent.getAvatarObject(); 8173 LLVOAvatar* avatar = gAgent.getAvatarObject();
8171 if ( avatar ) 8174 if ( avatar )
8172 { 8175 {