View Issue Details

IDProjectCategoryView StatusLast Update
0002203WishesSettingspublic2013-02-03 00:33
ReporterCyberShadow Assigned ToDrKnS  
PrioritynormalSeverityfeatureReproducibilityalways
Status closedResolutionfixed 
Platformx64OSWindowsOS Version2008 SP2
Product Version3.0 
Fixed in Version3.0 
Summary0002203: Не работал импорт
Descriptionhttp://forum.farmanager.com/viewtopic.php?f=4&t=7510

Использование неинициализированной переменной Global->Opt->ReadOnlyConfig. У меня там был мусор (ненулевое значение).
TagsNo tags attached.
Build2963

Activities

CyberShadow

2012-11-20 19:32

reporter  

0001-Fix-uninitialized-Global-Opt-ReadOnlyConfig-when-doi.patch (1,072 bytes)   
From 288c7d60373e6882b803974f054131cb10d1538c Mon Sep 17 00:00:00 2001
From: Vladimir Panteleev <vladimir@thecybershadow.net>
Date: Tue, 20 Nov 2012 21:28:21 +0200
Subject: [PATCH] Fix uninitialized Global->Opt->ReadOnlyConfig when doing
 import/export

---
 unicode_far/main.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/unicode_far/main.cpp b/unicode_far/main.cpp
index 31f1825..cd73c8b 100644
--- a/unicode_far/main.cpp
+++ b/unicode_far/main.cpp
@@ -487,6 +487,8 @@ int _cdecl wmain(int Argc, wchar_t *Argv[])
 
 	Global->Opt->IsUserAdmin=IsUserAdmin();
 
+	Global->Opt->ReadOnlyConfig = -1; // not initialized
+
 #ifndef NO_WRAPPER
 	// don't inherit from parent process in any case
 	// for OEM plugins only!
@@ -557,8 +559,6 @@ int _cdecl wmain(int Argc, wchar_t *Argv[])
 	// ������ �� ��������
 	Global->Opt->Macro.DisableMacro=0;
 
-	Global->Opt->ReadOnlyConfig = -1; // not initialized
-
 	string strProfilePath, strLocalProfilePath, strTemplatePath;
 
 	for (int I=1; I<Argc; I++)
-- 
1.8.0.msysgit.0.4.g9443e2c

DrKnS

2012-11-20 19:45

administrator   bugnote:0009747

2963

Issue History

Date Modified Username Field Change
2012-11-20 19:32 CyberShadow New Issue
2012-11-20 19:32 CyberShadow File Added: 0001-Fix-uninitialized-Global-Opt-ReadOnlyConfig-when-doi.patch
2012-11-20 19:45 DrKnS Build => 2963
2012-11-20 19:45 DrKnS Note Added: 0009747
2012-11-20 19:45 DrKnS Status new => closed
2012-11-20 19:45 DrKnS Assigned To => DrKnS
2012-11-20 19:45 DrKnS Resolution open => fixed
2012-11-20 19:45 DrKnS Fixed in Version => 3.0
2013-02-03 00:33 alexy Severity major => feature