Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Feb 9, 2021. It is now read-only.
This repository was archived by the owner on Feb 9, 2021. It is now read-only.

CSummInfo::IncrRevNum fails in UNICODE builds (file summinfo.cpp) #12

Open
Labels

Description

In Unicode builds of CSummInfo::IncrRevNum() the update TCHAR (which is wchar_t for Unicde) buffer gets written as type VT_LPSTR, which always expects a char*

BOOL CSummInfo::IncrRevNum() { ULONG count; _stscanf_s((LPCTSTR)GetRevNum(), _T("%lu"), &count); count++; TCHAR buff[20]; _stprintf_s(buff, 20, _T("%lu"), count); return m_pSection->Set(PIDSI_REVNUMBER, (void*)buff, VT_LPSTR); }

this can be fixed be replacing the last line of the function by

`return m_pSection->Set(PID_REVNUMBER, (void*)tcstocs(buff), VT_LPSTR);`

NB: tcstocs is defined at the top of the summinfo.cpp

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

        AltStyle によって変換されたページ (->オリジナル) /