MCPcopy Create free account
hub / github.com/AutoHotkey/AutoHotkey / WriteEncodeBase64

Method WriteEncodeBase64

source/Debugger.cpp:2569–2588  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2567}
2568
2569int Debugger::Buffer::WriteEncodeBase64(const char *aInput, size_t aInputSize, bool aSkipBufferSizeCheck/* = false*/)
2570{
2571 if (aInputSize)
2572 {
2573 if (!aSkipBufferSizeCheck)
2574 {
2575 // Ensure required buffer space is available.
2576 if (ExpandIfNecessary(mDataUsed + DEBUGGER_BASE64_ENCODED_SIZE(aInputSize)) != DEBUGGER_E_OK)
2577 return DEBUGGER_E_INTERNAL_ERROR;
2578 }
2579 //else caller has already ensured there is enough space and wants to be absolutely sure mData isn't reallocated.
2580 ASSERT(mDataUsed + aInputSize < mDataSize);
2581
2582 if (aInput)
2583 mDataUsed += Debugger::Base64Encode(mData + mDataUsed, aInput, aInputSize);
2584 //else caller wanted to reserve some buffer space, probably to read the raw data into.
2585 }
2586 //else there's nothing to write, just return OK. Calculations above can't handle (size_t)0
2587 return DEBUGGER_E_OK;
2588}
2589
2590// Decode a file URI in-place.
2591void Debugger::DecodeURI(char *aUri)

Callers 3

WritePropertyDataMethod · 0.80
DEBUGGER_COMMANDFunction · 0.80
WriteStreamPacketMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected