Japanese Simutrans Forum

日本語simutransフォーラム => バグレポート => 解決されたバグ => トピック開設者: z9999+ さんの発言 2010/12/10 19:52

トピック名: [r4012] 意図せず、パスワードが変更される
投稿者: z9999+ さんの発言 2010/12/10 19:52
問題:
プレイヤーがパスワードを変更する意図がないのに、パスワードが変更されてしまう。

再現手順:
1. パスワードウィンドウを開き、パスワードに「123」と入力し、リターンキーを押す。
2. もう一度パスワードウィンドウを開き、会社名の部分をクリックする。
3. パスワードウィンドウを閉じる。

結果:
パスワードが変更されてしまい、「123」では解除できない。

Problem:
Password will be changed unexpectedly.

How to reproduce:
1. Open password window.
2. Input '123' into password textfield and hit 'enter/return' key.
3. Open password window again.
4. Click on company name textfield or press 'tab' key.
5. Close password window.

Result:
Password will be changed. So, you can't unlock by '123' but can unlock only by 'enter/return' key.

Reason:
'if(komp == &password)' will be called in these cases too.

Note:
This kind of empty password is dangerous and strange.
トピック名: Re:[r4012] 意図せず、パスワードが変更される
投稿者: z9999+ さんの発言 2010/12/17 16:13
gui\password_frame.cc:70
引用
   if(komp == &password) {

引用
   if(komp == &password  &&  ibuf[0]!=0) {
トピック名: Re:[r4012] 意図せず、パスワードが変更される
投稿者: dwachs さんの発言 2010/12/17 16:30
imho there need to be somthing like a 'clear password' button in addition to your suggestion. Otherwise players cannot reset password to the situation 'no password given'.
トピック名: Re:[r4012] 意図せず、パスワードが変更される
投稿者: z9999+ さんの発言 2010/12/17 19:35
What do you mean 'reset' ?

If you mean 'removing lock state', this is not possible in current version.

Even thought player inputs empty password, player is still locked by empty password. Thus you cannot reset anyway.

If you want to allow empty password, it should be separate setting password window and setting company name window.

トピック名: [r4072] パスワードが設定されない
投稿者: z9999+ さんの発言 2010/12/18 23:26
問題:
パスワードが設定されない。

再現手順:
1. パスワード入力ウィンドウを開く。
2. パスワード欄に「123」と入力する。
3. 会社名を変更し、Enterキーを押す。

結果:
パスワードが設定されない。

問題点:
プレイヤーにはパスワードが正しく設定されたかどうかを確かめる手段がない。

Problem:
Password will not be set.

How to reproduce:
1. Open password window.
2. Input password field '123'.
3. Change company name and hit reruun key.

Result:
Password will not be set.

Why this is a problem.
Player cannot know password was set or not. Box color is always green anyway.

Note:
Don't force player input order.
Someone may input password first, but somone doesn't.
トピック名: Re:[r4012] 意図せず、パスワードが変更される
投稿者: z9999+ さんの発言 2010/12/20 16:06
What do you mean 'reset' ?

No comment ?
If you want to reset and re-open slot like OpenTTD, you need to clear hash not password.
Without clearing hash, empty password is empty password, there is no special meaning to empty password like as 'reset'.

This patch allow to re-open slot.
http://forum.japanese.simutrans.com/index.php?topic=393.0